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

Core: fix validation for input type="date"#2360

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

Merged
bytestream merged 3 commits intojquery-validation:masterfromtyomitch:master
May 6, 2022
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletionsrc/core.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1218,7 +1218,7 @@ $.extend( $.validator, {

// Exception: the jquery validate 'range' method
// does not test for the html5 'range' type
rules[ method ] = true;
rules[type === "date" ? "dateISO" :method ] = true;
}
},

Expand Down
5 changes: 5 additions & 0 deletionstest/rules.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -424,3 +424,8 @@ QUnit.test( "required method should return false for undefined & null values", f
assert.notOk( v.element( username ), "The username element should be invalid" );
assert.notOk( v.element( urlc ), "The urlc element should be invalid" );
} );

QUnit.test( "rules() - returns dateISO for input type=date", function( assert ) {
$( "#rangesMinDateInvalid" ).validate();
assert.deepEqual( $( "#minDateInvalid" ).rules(), { dateISO: true, min: "2012-12-21" } );
} );

[8]ページ先頭

©2009-2025 Movatter.jp