diff --git a/framework/validators/StringValidator.php b/framework/validators/StringValidator.php index 5a0fc3a..4d1b92c 100644 --- a/framework/validators/StringValidator.php +++ b/framework/validators/StringValidator.php @@ -159,6 +159,9 @@ class StringValidator extends Validator return 'yii.validation.string(value, messages, ' . json_encode($options, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) . ');'; } + /** + * @inheritdoc + */ public function getClientOptions($model, $attribute) { $label = $model->getAttributeLabel($attribute); diff --git a/framework/validators/Validator.php b/framework/validators/Validator.php index 2915d31..3fcc966 100644 --- a/framework/validators/Validator.php +++ b/framework/validators/Validator.php @@ -352,7 +352,7 @@ class Validator extends Component * @param string $attribute the name of the attribute to be validated. * @param \yii\web\View $view the view object that is going to be used to render views or view files * containing a model form with this validator applied. - * @return string the client-side validation script. Null if the validator does not support + * @return string|null the client-side validation script. Null if the validator does not support * client-side validation. * @see getClientOptions() * @see \yii\widgets\ActiveForm::enableClientValidation