[Zope3-Users] Validation of schemas?

Stephan Richter srichter at cosmos.phy.tufts.edu
Sat Nov 12 07:37:11 EST 2005


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.!

> One way I can see is to have update method with named parameters (which
> does the validation at the end of the method), but then (I think) I lose
> the  ability to have a <browser:editform> directive to generate the html
> form based on the schema for free.

That would be eek!

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training


More information about the Zope3-users mailing list