Hello,
What is currently the best way to change options and messages of post
validators?
$this->validatorSchema->setPostValidator(
new sfValidatorAnd(array(
new sfValidatorPropelUnique(array('model' => 'User', 'column' =>
array('username'))),
new sfValidatorPropelUnique(array('model' => 'User', 'column' =>
array('email'))),
))
);
For example, how do I set the 'invalid' error message of the email
validator? I can probably use a long chain of getters to do what I want such
as...
$validators = $this->validatorSchema->getPostValidator()->getValidators();
$validators[1]->setMessage('invalid', 'Email exists.');
... but is there a cleaner way to do what I want?
--
Regards,
Rytis
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" 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/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---