Hello Bedomon,
J'arrive peut être un peu tard, mais moi j'avais ce code en faisant ce superbe tuto de la ferme
D'ailleurs ce qui m'étonne c'est que tu n'a qu'un seul "required" dans le sfValidatorString 
Alors si t'a toujours pas trouvé la solution à ton souci, copie/colle cela pour voir ?
$this->setValidators(array( 'pseudo' => new sfValidatorAnd( array( new sfValidatorString( array('required' => true, 'min_length' => 3, 'max_length' => 20), array( 'min_length' => "The pseudo is too short. 3 characters minimum.", 'max_length' => "The pseudo is too long. 20 characters maximum", ) ), new sfValidatorRegex( array('pattern' => '/^[a-zA-Z0-9-]+$/') ) ), array(), array( 'required' => "The pseudo is required", 'invalid' => "The nickname could not contain special characters." ) ), 'pass' => new sfValidatorString( array('required' => true, 'min_length' => 4, 'max_length' => 20), array( 'min_length' => "The password is too short. 4 characters minimum.", 'max_length' => "The password is too long. 20 characters maximum", 'required' => "Password is required", 'invalid' => "The password must contains between 4 and 20 characters" ) ), ));
Bonne chance
Partager