Re: How do i validate multiple fields using the same field name?

2012-09-16 Thread resting
Ok, finally able to get it to work. The results if anyone is interested. https://github.com/resting/cakephp/commits/test_validation On Monday, 17 September 2012 10:29:07 UTC+8, resting wrote: > > Hi yes, realized my mistake. > > Have made the changes > https://github.com/resting/cakephp/commit

Re: How do i validate multiple fields using the same field name?

2012-09-16 Thread resting
Hi yes, realized my mistake. Have made the changes https://github.com/resting/cakephp/commit/ce2ffa4300f59720566a85db0b5ced5d4b96a117 But the result is still the same...weird... On Monday, 17 September 2012 03:40:36 UTC+8, euromark wrote: > > have you ever seen validates() taking arguments? es

Re: How do i validate multiple fields using the same field name?

2012-09-16 Thread euromark
have you ever seen validates() taking arguments? especially $data? nope $this->Model->set($this->request->data) $result = $this->Model->validates() as the book describes Am Sonntag, 16. September 2012 20:09:24 UTC+2 schrieb resting: > > Created a test setup with v2.2.0 > > Validation doesn't w

Re: How do i validate multiple fields using the same field name?

2012-09-16 Thread resting
Created a test setup with v2.2.0 Validation doesn't work. Empty fields still pass. What am I doing wrong here? Full source: https://github.com/resting/cakephp/blob/test_validation/app/Controller/MyFormController.php On Friday, 14 September 2012 15:42:36 UTC+8, resting wrote: > > I have someth

How do i validate multiple fields using the same field name?

2012-09-14 Thread resting
I have something like this in my view: echo $this->Form->input('Modelname.1.fieldname'); (ref: http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html#field-naming-conventions) I have this in my model: public $validate = array( 'filename' => array('ruleFilenameEmpty' =>