/** * Executes the real validation so it can be reused. * @param mixed $value The value to validate. * @return boolean Whether the value pass the validation. */ protected function doValidate($value) { if ($this->isEmpty($value)) { return true; } return !parent::doValidate($value); }
/** * Creates a new Alpha Validator. */ public function __construct() { parent::__construct('/^[a-z ]+$/i'); }