开发者

Symfony : how can i add a post validator without overriding the existing ones?

I'm using sfGuard plugin, and the register form by default has a few post va开发者_StackOverflow中文版lidators (for username and email).

I googled alot and haven't found any methods/hacks for adding post validators without having to rewrite them all...

Because when I do:

   $this->validatorSchema->setPostValidator(
      new sfValidatorCallback(array('callback' => array($this, 'checkPassword')))
    );

all the other post validators seem to disappear.


Try this one:

$this->mergePostValidator(
  new sfValidatorCallback(array('callback' => array($this, 'checkPassword')))
);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜