diff --git a/Type/CaptchaType.php b/Type/CaptchaType.php index 86d5ddb..456d121 100644 --- a/Type/CaptchaType.php +++ b/Type/CaptchaType.php @@ -70,8 +70,8 @@ class CaptchaType extends AbstractType $options['bypass_code'], $options['humanity'] ); - - $builder->addEventListener(FormEvents::POST_BIND, array($validator, 'validate')); + $event = \Symfony\Component\HttpKernel\Kernel::VERSION >= 2.3 ? FormEvents::POST_SUBMIT : FormEvents::POST_BIND; + $builder->addEventListener($event, array($validator, 'validate')); } /**