Re: [Zope3-Users] Validation of schemas?

2005-11-15 Thread Antonio Beamud Montero
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 invar

Re: [Zope3-Users] Validation of schemas?

2005-11-12 Thread Stephan Richter
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 f

Re: [Zope3-Users] Validation of schemas?

2005-11-03 Thread Adam Summers
Hi again, Thanks for the help so far. Using schemas I can do the following: class IBuddy(interface.Interface): """Provides access to basic buddy information""" fullname = TextLine(title=_("Name")) email = TextLine(title=_("Email Address"), required=False) phone

Re: [Zope3-Users] Validation of schemas?

2005-10-31 Thread Dominik Huber
[EMAIL PROTECTED] wrote: What I would want to be further explained is: When should I call validateInvariants? Of course I would call it when I'm creating or editing the object. Then, frequently, just after an add or edit form. More: can I then use auto generated forms (by using events after the

Re: [Zope3-Users] Validation of schemas?

2005-10-31 Thread gnotari
[EMAIL PROTECTED] wrote on 31/10/2005 06.12.43: > Just added this to FAQ (http://zissue.berlios.de/z3/z3faq.html). > I expects more contribution in coming months. > > > How to validate two or more fields simultaneously? > ~~ > > Use `invariants` to

Re: [Zope3-Users] Validation of schemas?

2005-10-30 Thread baiju m
On 10/31/05, Stephan Richter <[EMAIL PROTECTED]> wrote: > On Sunday 30 October 2005 04:45, Adam Summers wrote: > > How do I implement a validation rule that says either email or phone > > have to exist, but not necissarily both. > > You do that using invariants. Look at zope.interface/README.txt fo

Re: [Zope3-Users] Validation of schemas?

2005-10-30 Thread Stephan Richter
On Sunday 30 October 2005 04:45, Adam Summers wrote: >     How do I implement a validation rule that says either email or phone > have to exist, but not necissarily both. You do that using invariants. Look at zope.interface/README.txt for details. Regards, Stephan -- Stephan Richter CBU Physics

[Zope3-Users] Validation of schemas?

2005-10-30 Thread Adam Summers
Hi there, Using the buddy demo as an example, with the following interface: class IBuddy(zope.interface.Interface): """Provides access to basic buddy information""" fullname = TextLine(title=_("Name")) email = TextLine(title=_("Email Address")) phone = TextLine