public function __construct($name = null, $attributes = null, $data = null) { parent::__construct($name, $attributes, $data); $this->addRule('regex', "CSRF protection error - no value provided", '/^[a-zA-Z0-9_]{' . self::LEN . '}$/'); $this->addRule('callback', $this->getErrorMessage(), array($this, 'keyExists')); }
public function __construct($name = null, $attributes = null, $data = null) { parent::__construct($name, $attributes, $data); $this->addRule('callback2', $this->getErrorMessage(), array($this, 'checkValue')); }