you can user cakephp validation here the example form cakephp validation.
in your model you can user this code.
var $validate = array(
'field_name' => array(
'rule' => array(
'minLength',
1),
'required' => true,
'allowEmpty' => false,
'message' => 'Please enter a value
for the Name field'));
in the view you can user this code:
?php if ($form->isFieldError('Model_name.Field_name')){
e($form->error('Model_name.Field_name',
null,
array(
'class' => 'failure')
));
}
?>
try this i will work..
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" 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