[Product-Developers] Re: Need Help with Remember Workflow
Hedley Roos
hedley at upfrontsystems.co.za
Tue Jan 8 08:11:00 UTC 2008
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
More information about the Product-Developers
mailing list