Fix #17341 Re-add fix for yii.activeForm.js in strict mode (#17398)

This commit is contained in:
Michael Härtl
2019-06-27 09:44:13 +02:00
committed by Alexander Makarov
parent 0fcd495583
commit e6d7881bbe
2 changed files with 3 additions and 2 deletions

View File

@ -6,6 +6,7 @@ Yii Framework 2 Change Log
- Enh #17382: Added `\yii\validators\DateValidator::$strictDateFormat` to enable strict validation (alexkart)
- Bug #16394: Fixed issues in `migrate/create` when specifying default values with colons and adding multiple columns (alexkart)
- Bug #17341: Re-added fix for error from yii.activeForm.js in strict mode (mikehaertl)
2.0.21 June 18, 2019

View File

@ -705,10 +705,10 @@
return false;
}
var errorAttributes = [];
var $input = findInput($form, this);
var errorAttributes = [], $input;
$.each(data.attributes, function () {
var hasError = (submitting && updateInput($form, this, messages)) || (!submitting && attrHasError($form, this, messages));
$input = findInput($form, this);
if (!$input.is(":disabled") && !this.cancelled && hasError) {
errorAttributes.push(this);