[Grok-dev] validators

Sebastian Ware sebastian at urbantalk.se
Tue Aug 11 07:35:42 EDT 2009


You would normally do this in the interface and have the edit/add  
views enforce the data integrity. If this solves your problem you  
could look at this document:

http://grok.zope.org/documentation/tutorial/work-with-forms

Mvh Sebastian

10 aug 2009 kl. 18.47 skrev Thomas Bellembois:

> Hello,
>
> Where can we find a documentation about validators ? How can we  
> create a custom validator to overide the default validator ?
> I have a container "Molecule" with 4 fields:
>
> class Molecule(grok.Container):
>     interface.implements(IMolecule)
>     cas_number = u''
>     ce_number = u''
>     remark = u'--'
>
> and I have added a drop down list in the default template file to  
> add another field (like a foreign key). I would like this drop down  
> list to be a required field.
>
> Thanks for your help.
>
> Thomas
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> http://mail.zope.org/mailman/listinfo/grok-dev



More information about the Grok-dev mailing list