I want write custom validation on two fields.  The two fields
validation depends on another field.  I like to tell the scenario.
I have form consist Name, credit card type, credit card number and
credit card CVN.

For validation of credit card number and credit card CVN requires
credit card type.  How can I pass these and validate the field.  I
need to check credit card number and credit card CVN separately and
show error message.

I created a class and executing from my custom Form class which is
extended BaseForm.

$this->validatorSchema->setPostValidator(
      new sfCCvalidator(array('creditCardNumber'),
        array('labels' => array('creditCardNumber')),
        array('card_invalid' => '%required%')));

        $this->validatorSchema->setPostValidator(
      new sfCVNvalidator(array('cvv2Number'),
        array('labels' => array('cvv2Number')),
        array('cardcvn_invalid' => '%required%')));


sfCCvalidator and sfCVNvalidator are my validator classes which are
extended from sfValidatorSchema. I added login in doClean($values)
method and working fine
but only 1 validation is happening i.e. 'sfCVNvalidator.'  I feel
sfCVNvalidator is replaced on sfCCvalidator.


Could you please suggest me in this issue.

sorry for my English.

Thanks,
Hari.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to