Fix #18386: Fix assets/yii.activeForm.js incorrect target selector for validatingCssClass

This commit is contained in:
Dmitry Brusensky
2020-11-23 23:07:40 +03:00
committed by GitHub
parent 890df1c867
commit 47446a5a99
2 changed files with 9 additions and 2 deletions

View File

@ -4,6 +4,7 @@ Yii Framework 2 Change Log
2.0.40 under development 2.0.40 under development
------------------------ ------------------------
- Bug #18386: Fix `assets/yii.activeForm.js` incorrect target selector for `validatingCssClass` (brussens)
- Enh #18381: The `yii\web\AssetManager` `$basePath` readable and writeable check has been moved to the `checkBasePathPermission()`. This check will run once before `publishFile()` and `publishDirectory()` (nadar) - Enh #18381: The `yii\web\AssetManager` `$basePath` readable and writeable check has been moved to the `checkBasePathPermission()`. This check will run once before `publishFile()` and `publishDirectory()` (nadar)
- Bug #18199: Fix content body response on 304 HTTP status code, according to RFC 7232 (rad8329) - Bug #18199: Fix content body response on 304 HTTP status code, according to RFC 7232 (rad8329)
- Enh #18394: Add support for setting `yii\web\Response::$stream` to a callable (brandonkelly) - Enh #18394: Add support for setting `yii\web\Response::$stream` to a callable (brandonkelly)

View File

@ -569,7 +569,13 @@
$.each(data.attributes, function () { $.each(data.attributes, function () {
if (this.status === 2) { if (this.status === 2) {
this.status = 3; this.status = 3;
$form.find(this.container).addClass(data.settings.validatingCssClass);
var $container = $form.find(this.container),
$input = findInput($form, this);
var $errorElement = data.settings.validationStateOn === 'input' ? $input : $container;
$errorElement.addClass(data.settings.validatingCssClass);
} }
}); });
methods.validate.call($form); methods.validate.call($form);