|
|
@ -28,6 +28,17 @@ use yii\validators\Validator; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* {@inheritdoc} |
|
|
|
*/ |
|
|
|
public function validateAttribute($model, $attribute) |
|
|
|
{ |
|
|
|
$result = $this->validateValue($model->$attribute); |
|
|
|
if (!empty($result)) { |
|
|
|
$this->addError($model, $attribute, $result[0], $result[1]); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* {@inheritdoc} |
|
|
|
*/ |
|
|
@ -42,5 +53,6 @@ use yii\validators\Validator; |
|
|
|
} |
|
|
|
return $valid ? null : [$this->message, []]; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
?>
|