Maybe you can use the sfValidatorAnd?

http://www.symfony-project.org/forms/1_4/en/B-Validators#chapter_b_sub_sfvalidatorand

On Wed, Jan 20, 2010 at 10:39 AM, jojo <jojoyangd...@gmail.com> wrote:

> Hello everybody,
>
>
> I would like to ask my customer validator when the default one returns
> true (so no call if default one returns false)
>
> For example:
>
> //The default validator:
> $this->validatorSchema['link'] = new sfValidatorUrl();
>
> //I added customer validator:
> $this->validatorSchema->setPostValidator(
>            new sfValidatorCallback(array('callback' => array($this,
> 'checkLink')))
> );
>
> // Customer validator definition
> public function checkLink($validator, $values){
>       // some code here
> }
>
> What I would like to do is that if default validator returns false, I
> wont call my customer validator.
>
> Can anyone help me?
>
> Thanks a lot.
>
> JoJo
>
> --
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.
>
>
>
>


-- 
Sheraz Sharif
sharif.she...@gmail.com
http://sherazsharif.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-us...@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