mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-04 06:37:55 +08:00
Revert "Fixes #11972: Fixed active form afterValidate wasn't triggered in some cases"
This reverts commit 8211dcc41bef562cbb3249f89f97a3cee72310d5.
This commit is contained in:
@ -551,16 +551,15 @@
|
|||||||
var updateInputs = function ($form, messages, submitting) {
|
var updateInputs = function ($form, messages, submitting) {
|
||||||
var data = $form.data('yiiActiveForm');
|
var data = $form.data('yiiActiveForm');
|
||||||
|
|
||||||
var errorAttributes = [];
|
|
||||||
$.each(data.attributes, function () {
|
|
||||||
if (!$(this.input).is(":disabled") && !this.cancelled && updateInput($form, this, messages)) {
|
|
||||||
errorAttributes.push(this);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$form.trigger(events.afterValidate, [messages, errorAttributes]);
|
|
||||||
|
|
||||||
if (submitting) {
|
if (submitting) {
|
||||||
|
var errorAttributes = [];
|
||||||
|
$.each(data.attributes, function () {
|
||||||
|
if (!$(this.input).is(":disabled") && !this.cancelled && updateInput($form, this, messages)) {
|
||||||
|
errorAttributes.push(this);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$form.trigger(events.afterValidate, [messages, errorAttributes]);
|
||||||
|
|
||||||
updateSummary($form, messages);
|
updateSummary($form, messages);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user