Hi,
When I'm trying to use the textarea form helper with validation, it
doesn't work - all I get is my page displayed without the form fields
being displayed.
Model:
var $validate =
array(
'title' =>
array (
'minLength' => array( 'rule' =>
array('minLength', 2) ),
'maxLength' => array( 'rule' =>
array('maxLength', 50) )
),
'body' => array(
'minLength' => array( 'rule' =>
array('minLength', 2) ),
'maxLength' => array( 'rule' =>
array('maxLength', 1000) )
)
);
View:
$form->textarea('body', array('cols'=>'40', 'rows'=>'10') )
But it works fine when I use form->input, i.e.
$form->input('body',
array('error' => array(
'minLength' => 'The comment must have at least 2 characters',
'maxLength' => 'The comment must have no more than 1000
characters'
)
));
I checked the form helper code but there aren't any options for an
error array. Does anyone know of a workaround because I need to set
the cols and rows.
Thanks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---