Hi,
I have a number of string validators that are required and a post
validator. Currently when the required fields are not filled out, the
post validator is still running.
I would like to prevent the post validator from running if the other
required fields is not possible.
Form code is like:
<?php
class LoginForm extends sfForm
{
public function setup()
{
$this->setValidators(array(
'username' => new sfValidatorString(array('required' =>
true),array('required'=>'Please enter your username.')),
'password' => new sfValidatorString(array('required' =>
true),array('required'=>'Please enter your password.')),
));
$this->validatorSchema->setPostValidator(
new validatorLogin(array())
);
$this->widgetSchema->setNameFormat('login[%s]');
}
}
?>
Any ideas?
Cheers,
Stig Manning
http://www.sdm.co.nz/
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---