mirror of
https://github.com/yiisoft/yii2.git
synced 2025-10-30 18:17:00 +08:00
Fixed #14901: fixed both implementation and test of trim() JavaScript validator
This commit is contained in:
@ -238,9 +238,7 @@ yii.validation = (function ($) {
|
||||
|
||||
trim: function ($form, attribute, options, value) {
|
||||
var $input = $form.find(attribute.input);
|
||||
var isCheckAble = $input.find('[type=radio]').is('[type=radio]') || $input.find('[type=checkbox]').is('[type=checkbox]');
|
||||
|
||||
if (!isCheckAble) {
|
||||
if ($input.is(':checkbox, :radio')) {
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user