Hi, Euromark. Unfortunately, assign value "true" in param "last" not worked for me. I think this error is strange and I'm trying understand if it have relation with PHP version.
My test server runs Ubuntu server 11.0 and PHP 5.3.6-13ubuntu3.3 with Suhosin-Patch (cli) (built: Dec 13 2011 18:18:37) Copyright (c) 1997-2011 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies Regards On Dec 29 2011, 10:43 pm, euromark <[email protected]> wrote: > 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
