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
the problem that I'm having is after I validate input and If I use the local context to display the message. THe second time when I try to validate Data object. The same message is shown.
I use the custom messages like "any.only": {#value} does not match provided
And If I try to validate with the same object twice in a row, with data { "test": "Some text" } , and then with { "test": "Some text22" } I get twice the same message Some textdoes not match provided
What was the result you got?
And If I try to validate with the same object twice in a row, with data { "test": "Some text" } , and then with { "test": "Some text22" } I get twice the same message Some text does not match provided
This is not valid it should always show the updated value.
What result did you expect?
I expect the local value to be updated properly and to show the proper warning.
The text was updated successfully, but these errors were encountered:
Runtime
node
Runtime version
18
Module version
latest
Last module version without issue
No
Used with
standalone
Any other relevant information
No response
What are you trying to achieve or the steps to reproduce?
Hi, I have been using Joi library latest to validate some complex schemas. And I have noticed following issue.
I have a schema stored as a string in Redis. What I do I fetch it. Then build it and use to validate some objects.
My code looks like this
the problem that I'm having is after I validate input and If I use the local context to display the message. THe second time when I try to validate Data object. The same message is shown.
I use the custom messages like "any.only":
{#value} does not match provided
And If I try to validate with the same object twice in a row, with data { "test": "Some text" } , and then with { "test": "Some text22" } I get twice the same message
Some textdoes not match provided
What was the result you got?
And If I try to validate with the same object twice in a row, with data { "test": "Some text" } , and then with { "test": "Some text22" } I get twice the same message
Some text does not match provided
This is not valid it should always show the updated value.
What result did you expect?
I expect the local value to be updated properly and to show the proper warning.
The text was updated successfully, but these errors were encountered: