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
which support plan is this issue covered by? (e.g. Community, Core, Plus, or Enterprise): Community
is this issue currently blocking your project? (yes/no): yes
is this issue affecting a production system? (yes/no): no
Context
node version: v12.16.1
module version: v16.1.7
environment (e.g. node, browser, native): node
used with (e.g. hapi application, another framework, standalone, ...): hapi
any other relevant information:
How can we help?
Hello,
I want to validate multiple value ranges for single attribute. There are many ranges for single attribute and I need to validate for more than 100 attributes.
Say attribute age can have value range range1 = between 10 to 15.
attribute age can have value range range2 = between 20 to 25.
I want to validate these two rules in such a way that If I pass attribute value 11. The result can let me know yes it is valid because of range1. So when I am using this code
it gives me just value as a response in case any of the passed value is in between any of the ranges. I want for which range it was successful.
Question 1 - I want error like information for any of the successful validation too OR Is it possible to set custom successful message for validation instead of just value return?
Question 2 - Joi.alternative gives error only in case of all of the passed schema fails. Is there any other way to achieve this error and success both for all schema that are validated. Please help.
The text was updated successfully, but these errors were encountered:
hueniverse
changed the title
Custom Success Message OR Extra details on successful validate
Validation artifacts collected from successful rules
Jul 13, 2020
Support plan
Context
How can we help?
Hello,
I want to validate multiple value ranges for single attribute. There are many ranges for single attribute and I need to validate for more than 100 attributes.
Say attribute age can have value range range1 = between 10 to 15.
attribute age can have value range range2 = between 20 to 25.
I want to validate these two rules in such a way that If I pass attribute value 11. The result can let me know yes it is valid because of range1. So when I am using this code
it gives me just value as a response in case any of the passed value is in between any of the ranges. I want for which range it was successful.
Question 1 - I want error like information for any of the successful validation too OR Is it possible to set custom successful message for validation instead of just value return?
Question 2 - Joi.alternative gives error only in case of all of the passed schema fails. Is there any other way to achieve this error and success both for all schema that are validated. Please help.
The text was updated successfully, but these errors were encountered: