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

增加内置规则 `validate` #176

Closed
niceue opened this Issue Mar 4, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@niceue
Copy link
Owner

niceue commented Mar 4, 2015

validate(name1, name2, #id1, #id2, ...)

validate规则不会对当前验证字段产生影响,而是验证其他字段。

<input name="name1" data-rule="required">
<input id="id2" data-rule="required;validate(name1)">
<input id="id3" data-rule="required;validate(name1, #id2)">

当验证id2的时候会触发name1的验证,验证id3的时候会触发name1和id2的验证

@niceue niceue added this to the 0.8.0 milestone Mar 4, 2015

@niceue niceue closed this Mar 4, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment