I can also write a function to validate the array if it belongs to
certain type. But then to populate the message correctly in the view,
it needs stuff to be written and its not elegant solution. So I am
looking for a better solution.
On Jun 11, 8:33 pm, Ketan Patel <[EMAIL PROTECTED]> wrote:
> In CakePHP 1.2, is it possible to validate an array of elements to be
> of certain type. for eg.: I want the user to enter name in several
> input textboxes. I have named them as name_1, name_2 and so on.
>
> For ease of use, I save all name_{n} in an array name. I want to
> validate this array name to of type 'alphaNumeric' . {n} is a varying
> number.
>
> var $validate = array('name' => array('rule'=>'alphaNumeric',
> 'message'=>'Not Valid name'));
>
> I believe its not then what would be best scenario to handle the form
> with similar elements and validate them?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---