Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validator文档中发现一处错误 #82

Open
wonderbeyond opened this issue Aug 22, 2014 · 0 comments
Open

Validator文档中发现一处错误 #82

wonderbeyond opened this issue Aug 22, 2014 · 0 comments

Comments

@wonderbeyond
Copy link

http://aralejs.org/validator/docs/rules.html

关于添加校验规则的代码片段:

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()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant