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