Example #1
0
 /**
  * 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);
 }
Example #2
0
 /**
  * Creates a new Alpha Validator.
  */
 public function __construct()
 {
     parent::__construct('/^[a-z ]+$/i');
 }