You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Validator.addRule('valueBetween', function(options) {
var v = Number(options.element.value);
return v <= options.max && v >= options.min;
}, '{{display}}必须在{{min}}和{{max}}之间');
据我实测, options.element 是一个jQuery对象, 没有 value 属性应该是 options.element.val()
The text was updated successfully, but these errors were encountered:
http://aralejs.org/validator/docs/rules.html
关于添加校验规则的代码片段:
据我实测,
options.element
是一个jQuery对象, 没有value
属性应该是options.element.val()
The text was updated successfully, but these errors were encountered: