Use another part of the Archetypes API: method validators.

Example: you have a field called school_affiliation.

Write a method in the AHSMember class:

def validate_school_affiliation(self, new_value):
        if value == 'nothing':
                return 'School affiliation must be something'
        return None

The method may be called validate_School_affiliation, not sure about the case.

This way you avoid validation classes. Besides, unless you plan to re-use validators the validation classes are overkill.

Hedley

_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to