Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Changed order of validators#640

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
hardchor wants to merge1 commit intojquery-validation:masterfromhardchor:master

Conversation

hardchor
Copy link

... to allow more general validators (number, date) to be executed before more specific ones (min, max, range).

The original issue was that I've attached a number of validators to a field like so:

<inputtype="text"id="some-value"name="some-value"data-rule-required="true"data-rule-number="true"data-rule-min="1"data-rule-max="5">

Since the validators are being checked against sequentially, the min and max validators kick in before the number validator. An example where this becomes obvious is when I enter "a" into the input field and it displays an error that the minimum input is 1 (rather than telling me that it's not a number).

@jzaefferer
Copy link
Collaborator

Thanks! I've fixed the indentation (should be tabs) to land this.

@hardchor
Copy link
Author

Ah, sorry about this. Coding standards here are to use spaces, guess my IDE "fixed" this ;)

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@hardchor@jzaefferer@skyhaikuteam

[8]ページ先頭

©2009-2025 Movatter.jp