next up previous contents
Next: Mandatory, Length Up: A Code Generation How-To Previous: Composite views   Contents


Another crucial part of designing a large system is the ability to validate your data classes. For simple validations like mandatory fields, string length, and regular expression matching, Abra allows validate nodes for each field. Combined with the generation switch '-validation' Abra will generate classes of the name Baseclass-nameValidator in the same package as the class is generated.

For 'deepValidation' - that is validating composite sub-objects and for complicated multi-field, or DB lookups these must be written by hand.