Since you are using CakePHP 1.2, you have two options:
1. If you are not using input() to create your field, then you can use the
second parameter when calling error(), like so:
<?php echo $form->label('Model/field'); ?>
<?php echo $form->text('Model/field'); ?>
<?php echo $form->error('Model/field', 'My error message'); ?>
2. If you are using input(), set the error message as part of the options:
<?php echo $form->input('Model/field, array('error' => 'My error message'));
?>
-MI
---------------------------------------------------------------------------
Remember, smart coders answer ten questions for every question they ask.
So be smart, be cool, and share your knowledge.
BAKE ON!
blog: http://www.MarianoIglesias.com.ar
-----Mensaje original-----
De: [email protected] [mailto:[EMAIL PROTECTED] En nombre
de dericknwq
Enviado el: Domingo, 22 de Abril de 2007 01:32 a.m.
Para: Cake PHP
Asunto: Re: where to change or add 'This field cannot be left blank' such
validate msg?
In your $validate array, do something like
$validate = array(
'fieldname' => array(
'allowEmpty' => false,
'message' => 'Boo, enter something yea?',
'rule' => 'blank'
)
);
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---