Ian P. Christian wrote:
> $this->setValidatorSchema(
> new sfValidatorSchema(array(
> 'username' => new sfValidatorString(),
> 'password' => new sfValidatorString(),
> '_post_validator' => new myValidatorLogin(array('username' =>
> 'username', 'password' => 'password')),
> )));
>
Having implemented this, I've run into the next issue.
The post validator is obviously run even when no password is
supplied.... which means on submitting a empty form, you see that a
password is required, and a message about 'invalid username/password
combination'.
I could modify my 'myValidatorLogin' validator so that it only runs when
both 'username' and 'password' contain data, but that seems very wrong,
as it's relying on previous validation.
I feel I'm approaching the problem wrong here - maybe the
username/password checkign should be moved to isValid() and only run
once the form is valid? or maybe it should not be part of the form at
all, and checked by the action using the form....
Any ideas?
--
Ian P. Christian ~ http://pookey.co.uk
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---