Skip to content
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

nested validations state structure #1002

Open
ahoyahoy opened this issue Feb 5, 2022 · 1 comment · May be fixed by #1050
Open

nested validations state structure #1002

ahoyahoy opened this issue Feb 5, 2022 · 1 comment · May be fixed by #1050

Comments

@ahoyahoy
Copy link

ahoyahoy commented Feb 5, 2022

When I use $each: helpers.forEach({, I must follow the structure of child models.
Throws error If the tested prop is missing.
If I do the same in the root, it's fine.

DEMO:
see console
https://stackblitz.com/edit/vitejs-vite-brtsmn?file=src%2FApp.vue&terminal=dev

@ahoyahoy ahoyahoy changed the title nested validates nested validations state structure Feb 5, 2022
@dobromir-hristov
Copy link
Contributor

This is because the forEach helper iterates over the data and all of it's properties, rather than iterating over the rules, and building the state up, for each validator.

This should be easy enough to change in the forEach.js helper, I am just not sure whether that is the right thing to do. Its technically a breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants