T
Tim Kuehn
Guest
[quote user="Peter Judge"] A Validator type that contains a set of Validation instances and loops through them all, validating and gathering errors as it goes. The Validator type would be where you can add custom/extra validation rules. When a (say) save operation is performed, get an object's Validator and do the validations within. The fun part now is figuring out how to generically associate Validators with other objects. [/quote] I'm wondering if the Decorator pattern would be appropriate here as it would allow you to create arbitrary stacks of functionality / validations at run time.
Continue reading...
Continue reading...