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

isDate throws when using a non-valid string with a format #2272

Open
dackmin opened this issue Aug 22, 2023 · 1 comment
Open

isDate throws when using a non-valid string with a format #2272

dackmin opened this issue Aug 22, 2023 · 1 comment
Labels

Comments

@dackmin
Copy link

dackmin commented Aug 22, 2023

Describe the bug
Since v13.11.0 isDate throws when passing a non-valid string with a format.
v13.9.0 works wonders.

Examples

isDate('20', { format: 'DD/MM/YYYY' })

https://runkit.com/dackmin/64e4acf5889ae3000967d281

(working example with 13.9.0 is also in there)

Additional context
Validator.js version: v13.11.0
Node.js version: v18.17.1
OS platform: MacOS 13.4.1

@olaleykhan
Copy link

@dackmin , you are very right. I think I have found the problem. I will be raising a pull request today that should fix the issue.

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

No branches or pull requests

2 participants