-
Notifications
You must be signed in to change notification settings - Fork 90
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
Feat: add array index in path #309
Comments
not sure if this would be a correct solution. |
I didn't check, but I found out by tracing the code. I don’t remember how I decided in my case, but I did something differently. And the current problem is actually. I just forgot about it. |
I’ve been thinking about this issue, and after looking at the code, it’s not easily implementable unless the for loop saves the dynamic path in context.meta, for example. However, it’s also true that each element of the array must be validated individually, otherwise the validation must be implemented at the highest level. Therefore, I think we can close this issue. |
When validating an array of objects, when we use custom in nested rules, we cannot get the array element we are validating.
fastest-validator/lib/rules/array.js
Lines 84 to 88 in 7b35571
An example of such a scheme:
The solution might be to change
on the
The text was updated successfully, but these errors were encountered: