El sáb, 12-11-2005 a las 07:37 -0500, Stephan Richter escribió:
> On Thursday 03 November 2005 08:09, Adam Summers wrote:
> > This will do the validation on add. But how do I get the schema  to be
> > validated on an
> > update to it?
> You could write your own property class that does the invariant checks. See
> zope.schema.fieldproperty.FieldProperty
> In fact, if you feel heroic, you should just add the invariance check to that 
> code and check it in! That would be a great feature.!

If I define a field in a schema like:
groups = List(title=u'Groups',
              description=u'Groups of the contacts',

and in the class implementing this interface:

groups = FieldProperty(icontact.IContact['groups'])

The problem is how to define that groups is a PersistentList.
If I define the default schema as "default=PersistentList()" an error

ConfigurationError: ('Invalid value for', 'interface', "([], <type


Zope3-users mailing list

Reply via email to