A small bug in the advanced validation approach

Published on and tagged with cakephp  tip  validation

There is a small bug in the validation approach I described in an earlier post and in the wiki. The following two lines should be outside of the foreach loop:

$this->validationErrors = $errors;
return $errors;

Bake a comment




(for code please use <code>...</code> [no escaping necessary])

© daniel hofstetter. Licensed under a Creative Commons License