Re: How to determine specific rule that was triggered on validation?

2011-02-22 Thread John Andersen
You probably have to use a combination of defining your validation rules according to the CakePHP book at: http://book.cakephp.org/view/1151/Multiple-Rules-per-Field and then use the models invalidFields method to pass the errors on to the view, so that you may discern which error rule is being

How to determine specific rule that was triggered on validation?

2011-02-21 Thread O.J. Tibi
Hi all, I need some ideas on this one. We all know pretty well that a model gathers messages from failing validation rules whenever it performs validations, and these messages can be retrieved using $Model- invalidFields(). I was thinking, what if I wanted to check if a particular validation rule