i am using the cake 1.2, i have the following validation rules in my
model
var $validate = array(
'username' => array(
'required' => VALID_NOT_EMPTY,
'length' => array('rule' => array('between',3,10))
);
and my Cake template,
<?= $form->input('User.username', array('error' => array('required' =>
'Username is required', 'length' => 'Username too short'), 'size' =>
'20', 'maxlength' => '20', 'label' => false )) ?>
when i try to validate the model, if there is an error(either required
or length), the error message that is displayed is Array instead of
"username is required" or "username too short". Why isnt the value
picking up and displaying the correct one but display the error array.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---