Provide data from the failing item when refining the validation of an array #3763
Unanswered
lorenzo-dallamuta
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to validate that each item in an array of objects passes a logic check, and if it doesn't I'd like for the error message to point out which item failed, possibily using a property of the object itself. So that for the schema below:
if I had an array such as
[{ id: 42, accepted: false, required: true }]
I would like to get the error messageItem 42 should be accepted
.Is this possibile? How can I achieve that?
Beta Was this translation helpful? Give feedback.
All reactions