yii\validators\Validator::validateValue PHP Method

validateValue() protected method

A validator class can implement this method to support data validation out of the context of a data model.
protected validateValue ( mixed $value ) : array | null
$value mixed the data value to be validated.
return array | null the error message and the parameters to be inserted into the error message. Null should be returned if the data is valid.
    protected function validateValue($value)
    {
        throw new NotSupportedException(get_class($this) . ' does not support validateValue().');
    }

Usage Example

コード例 #1
0
 /**
  * {@inheritdoc}
  */
 public function validateValue($value)
 {
     return $this->originalValidator->validateValue($value);
 }