mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-14 13:25:23 +08:00
Form asset bundle registering code moved from ActiveForm::run() to the *Validator::clientValidateAttribute().
This commit is contained in:
@@ -170,6 +170,7 @@ class StringValidator extends Validator
|
||||
$options['skipOnEmpty'] = 1;
|
||||
}
|
||||
|
||||
$view->registerAssetBundle('yii/form');
|
||||
return 'yii.validation.string(value, messages, ' . json_encode($options) . ');';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user