as far as I know cake2 returns arrays for the fields by default - especially if there are multiple rules per field. if you only want the one error, you need to use "last"=>true in your rules
On 30 Dez., 00:21, Moiz <[email protected]> wrote: > Hello there, > > Why does $this->ModelName->invalidFields(); returns the following > array? > array('field1' => array('error1', 'error1'), 'field2' => 'error2', > 'error2'); > > Is it designed to do this or I am making a mistake somewhere? > I am using cake 2.0.x > > Any help on this is greatly appreciated. > Thank you. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
