I was wondering whether anyone could help me.

Sometime ago I created all my validation using the strategy pattern which worked great.

As the application has evolved I realized there was an obvious requirement to group validation together and therefore I created some specific validators (user, payment) which aggregated the base validator classes.

Now I find myself with the need to run different validation routines based on certain conditions, for instance validating cards in different ways.

One idea I had was to create an array of rules, and return the required fields and the necessary validation object.

My quandry now is how I would then add the relevant parameters to returned object:

Code:
class PaymentValidatorRules {
	
	private $rules = array();
	
	function __construct($type=NULL) {
		$this->loadPaymentValidatorRules($type);
		
	}
	
	
	private function loadPaymentValidatorRules($type=NULL) {
		
			//Set up the validator object
			$validator = new Payment_Validator;
		
			//Set default rules
			$this->rules[] = array('fields' => array('type'),  'validator' => $validator);

}
Anyone with a fresh set of eyes offer a better way to go about this type of validation?