[Zope3-Users] schema interface field validation

Gary Poster gary at zope.com
Thu May 5 09:40:44 EDT 2005


On May 5, 2005, at 3:16 AM, Alen Stanisic wrote:

> Hi,
>
> could I reference other fields inside the schema interface to, for
> example,
> default one field based on the value entered in one of the previous
> fields,
> or to set 'required' attribute based on previous fields entered

One way (the "approved" way) to do this is almost ready.  Part of the  
vision of fields is that they may only validate within themselves.   
Interfaces are the way to make statements about groups of fields.   
You may make statements about interactions of fields with invariants:  
see zope/interface/README.txt and look for the word 'invariant'.

What we don't have yet is form machinery that checks invariants and  
displays the errors.  This is working in our local code and will be  
part of Zope 3.2.

Gary



More information about the Zope3-users mailing list