You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What are you trying to achieve or the steps to reproduce ?
I'm trying to validate that a date string follows a format, but it throws no error when I use it with Joi.assert for numbers that are strings.
hueniverse
changed the title
Joi.assert with Joi.date() schema doesn't throw error on number strings
Fails to enforce required format when value is a number string
Oct 5, 2019
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
lockbot
locked as resolved and limited conversation to collaborators
Jan 9, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Context
What are you trying to achieve or the steps to reproduce ?
I'm trying to validate that a date string follows a format, but it throws no error when I use it with Joi.assert for numbers that are strings.
https://runkit.com/ljle/joi-joi-date-potential-bug-with-number-strings
If I run it with something like
100x
or1-1
, it does throw the error.Which result you had ?
undefined
What did you expect ?
A ValidationError thrown
The text was updated successfully, but these errors were encountered: