In User.class.php i have:
$this->setCode(sha1($this->getPassword()));
This is ok. In register form i would like use sfValidatorDoctrineUnique.
$this->validatorSchema->setPostValidator(new sfValidatorDoctrineUnique(array('model'=>'User', 'column'=>'code')));
But this doesnt work. This check password from form without sha1 and from database with sha1. I use sfValidatorDoctrineUnique also for email (without sha1) and this working ok.
How can i fix it? I use Symfony 1.4.12
Why the hell would you check if the password is unique? this makes totally no sense
UPD: For creating an own validator create a /lib/valdator/sfValidatorDoctrineFoobar.class.php
just to show you an example.. you’ll have to change the code to your needs 😉