Hello Sebastian,<br><br>Actually the field I want to validate is *not* one of the 4 fields of my Molecule class.<br>I have a 1-&gt;* relationship between the &quot;Molecule&quot; container and a &quot;Family&quot; container.<br>

So I have modified the default Molecule homastemplate file to add a drop down list with the families.<br>I want to validate this drop down list (make it required).<br><br>Thanks for your help.<br><br>Regards,<br><br>Thomas<br>
<br><div class="gmail_quote">On Tue, Aug 11, 2009 at 1:35 PM, Sebastian Ware <span dir="ltr">&lt;<a href="mailto:sebastian@urbantalk.se">sebastian@urbantalk.se</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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:<br>
<br>
<a href="http://grok.zope.org/documentation/tutorial/work-with-forms" target="_blank">http://grok.zope.org/documentation/tutorial/work-with-forms</a><br>
<br>
Mvh Sebastian<br>
<br>
10 aug 2009 kl. 18.47 skrev Thomas Bellembois:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
Hello,<br>
<br>
Where can we find a documentation about validators ? How can we create a custom validator to overide the default validator ?<br>
I have a container &quot;Molecule&quot; with 4 fields:<br>
<br>
class Molecule(grok.Container):<br>
    interface.implements(IMolecule)<br>
    cas_number = u&#39;&#39;<br>
    ce_number = u&#39;&#39;<br>
    remark = u&#39;--&#39;<br>
<br>
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.<br>
<br>
Thanks for your help.<br>
<br>
Thomas<br></div></div>
_______________________________________________<br>
Grok-dev mailing list<br>
<a href="mailto:Grok-dev@zope.org" target="_blank">Grok-dev@zope.org</a><br>
<a href="http://mail.zope.org/mailman/listinfo/grok-dev" target="_blank">http://mail.zope.org/mailman/listinfo/grok-dev</a><br>
</blockquote>
<br>
</blockquote></div><br>