On Sat, Mar 29, 2008 at 7:04 PM, Thomas Rabaix <[EMAIL PROTECTED]> wrote:
> public function isValid() {
> $valid = parent::isValid();
>
> if($this['password']->getValue() !=
> $this['password2']->getValue()) {
> $valid = false;
>
> $error = new sfValidatorError(new
> sfValidatorString(),'invalid');
> $this->getErrorSchema()->addError($error,
> 'password2');
> }
>
> return $valid;
> }
You should create a custom validator for value comparison purpose (eg.
sfValidatorCompare, maybe this one already exist though) and add it to
your form validator schema.
++
--
Nicolas Perriault
http://prendreuncafe.com/blog
GSM: 06.60.92.08.67
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony developers" 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-devs?hl=en
-~----------~----~----~----~------~----~------~--~---