Hello folks, I just played around with the validation of the schemata and created the example listed below. According to the book by Philip it should rase a validation exception at the end. That's what the FieldProperty is supposed to do, but it does not do it here. (Tested in the zope debug console) Why?
from zope.interface import Interface, implements from zope.schema import Int from zope.schema.fieldproperty import FieldProperty class ITest(Interface): number = Int( title = u'A number' ) class test(object): implements(ITest) number = FieldProperty(ITest['number']) test_class = test() print test.number # get <zope.schema.fieldproperty.FieldProperty object at 0x27537d0> test.number = 20 # this is ok print test.number # get 20 test.number = "not an int" # should raise exception, does not, why? -- Sebastian Bartos, <seth.kriti...@googlemail.com> keyserevr: pgp.mit.edu
Description: This is a digitally signed message part
_______________________________________________ Zope3-users mailing list Zope3firstname.lastname@example.org http://mail.zope.org/mailman/listinfo/zope3-users