[Zope3-Users] Validation of schemas?

Adam Summers adam at 4js.com.au
Sun Oct 30 04:45:55 EST 2005


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(title=_("Phone Contact"))

    How do I implement a validation rule that says either email or phone 
have to exist, but not necissarily both.

    I was hoping that I could add another zope.schema.Field which would 
hold the validation rule, but I cant see how.

    Any help would be appreciated.

Thanks and Regards,
Adam




More information about the Zope3-users mailing list