Пример #1
0
 /**
  * {@inheritDoc}
  */
 public function isOptionalNumeric($value, $suppressException = true)
 {
     /* Clear the last error. */
     $this->lastError = null;
     /* If valid just return true. */
     if (Validator::isOptionalNumeric($value)) {
         return true;
     }
     /* Set the error message. */
     $this->lastError = sprintf('Expected null or numeric, \'%s\' given.', gettype($value));
     return $this->validationFailed($suppressException);
 }