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

Add new method which will return detailed errors info after validation #2900

Closed
Mikilll94 opened this issue Sep 16, 2020 · 2 comments
Closed
Labels
✨ enhancement a "nice to have" feature request This issue is a request by its author

Comments

@Mikilll94
Copy link

Is your feature request related to a problem? Please describe.
There are many issues related to the inability of getting all errors after validation. Here are the examples:
#2660
#2569
#2546

VeeValidate is a great library but for me this is very strange that such a complex library does provide no way of getting detailed errors information after validation.

Describe the solution you'd like
My solution is simple. We already have the validate method in ValidationObserver which returns true or false depending on validation results. We probably cannot change the return value of this method, because this would a breaking change.

That's why we can provide a different method. It can be called, i.e. validateAll (I don't have a better name). This method should return detailed validation information about all errors.

I saw in the source code, that there is already an internal validate function which returns detailed validation result

export async function validate(

So, maybe this won't be difficult bring this method to the public API?

Additional context
I know that you are probably working on v4, but this simple feature would be very beneficial for many projects which depends on VeeValidate v3. Also many projects probably won't migrate to v4 if the migration will be too costly.

@logaretm logaretm added request This issue is a request by its author ✨ enhancement a "nice to have" feature labels Sep 18, 2020
@logaretm
Copy link
Owner

logaretm commented Sep 22, 2020

added validateWithInfo() in 3.4.0

@Mikilll94
Copy link
Author

Mikilll94 commented Sep 22, 2020

@logaretm
Thanks a lot 👍
I checked it and it works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement a "nice to have" feature request This issue is a request by its author
Projects
None yet
Development

No branches or pull requests

2 participants