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
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
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
[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
[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
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
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
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