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

Commit a282933

Browse files
Update validators.js
new Date('wrong string') return a string 'Invalid Date' which is not usable with boolean negation.
1 parent fa934e8 commit a282933

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/utils/validators.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ const validators = {
149149
if (res != null) return res;
150150

151151
let m = new Date(value);
152-
if (!m) {
152+
if (isNaN(m.getDate())) {
153153
return [msg(messages.invalidDate)];
154154
}
155155

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /