-
-
Notifications
You must be signed in to change notification settings - Fork 84
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 alway fails #1120
Comments
Hi @NormandoHall, thanks for reaching out! I just checked both examples that you supplied, and they both seem to be passing: On the right hand side you're seeing the proxy Object being returned from enforce, instead of an error being thrown - which means that isDate does indeed pass. I am wondering how it looks inside your suite, there may be something else at play. Do you have a quick repro sandbox that I can take a look at? |
Hi @ealush, Thanks for your quick reply. I have forked your svelte example sandbox, and added the form field "birthDate" and added the test in the suite, and still fails. https://codesandbox.io/p/sandbox/svelte-vest-5-isdate-fail-vtdzjw |
@NormandoHall Can you try just inputting this: |
It is very strange. I tested vest.mp4 |
Well, with |
OK. I think you are right. I had the 13.9.0 locally installed and that's why I did not experience this. I downgraded and now I see this. Releasing now a patch version of Vest with the lower validator version. Will be out in a few moments. |
@ealush, now runs like a charm. Thank you! |
Fail:
No fails:
Node: v18.18
Vest: 5.2.3
The same happens importing external rules from
validator
or using built in plugins.EDIT: Seems an issue with
validator
?validatorjs/validator.js#2256
EDIT2:
Yes, there is an issue with
validator
. A quick and dirty workaround for me is parsing withdayjs
and convert to Date object. No fails with the format, but not validates de date.The text was updated successfully, but these errors were encountered: