/** * Notifies the 'form.filter_values' and 'form.validation_error' events. * * @see sfForm */ protected function doBind(array $values) { if (self::$dispatcher) { $values = self::$dispatcher->filter(new sfEvent($this, 'form.filter_values'), $values)->getReturnValue(); } try { parent::doBind($values); } catch (sfValidatorError $error) { if (self::$dispatcher) { self::$dispatcher->notify(new sfEvent($this, 'form.validation_error', array('error' => $error))); } throw $error; } }