mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-01 03:26:36 +08:00
Attach forceValidate event to attributes
Allow attributes to have their validation triggered by a custom event. `validateAttribute` is called with `forceValidate` set to true.
This commit is contained in:
@ -413,6 +413,9 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
$input.on('forceValidate.yiiActiveForm', function() {
|
||||||
|
validateAttribute($form, attribute, true);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var unwatchAttribute = function ($form, attribute) {
|
var unwatchAttribute = function ($form, attribute) {
|
||||||
|
|||||||
Reference in New Issue
Block a user