I am processing an application and it involves validating it. Validation process has many rules to process. Like usual case, application passes through a set of rules and if one rule invalidates it, rest of rules don't execute and application is rejected.
Also rules tend to change for different customers. At one time only one set of customer rules will be active. How should i design my validator class so that it would only suffice to change code for the changed rule and not all rules.
Validator interface is obvious. What i need pattern for are the rules. What i have done for another validator is create classes say: AValidator, BValidator, CValidator. (Rules were divisible into 3 categories)
Each class has set of rules defines in protected methods so that CustomeAValidator could override that method and rest would remain as such.