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

Detect which form fields have validation error #553

Open
ravgeetdhillon opened this issue Jul 26, 2022 · 0 comments
Open

Detect which form fields have validation error #553

ravgeetdhillon opened this issue Jul 26, 2022 · 0 comments
Labels
bug report A submitted bug report, not yet validated.

Comments

@ravgeetdhillon
Copy link

First of all, thanks for this wonderful package.

I have two issues that I need to fix in the app I am currently working on.

  1. How do I prevent the user from going back if the form is currently not saved? For example, preventing a user from pressing the browser's back button. If they do press, I want to show an alert box saying that they have some unsaved changes.

  2. I have a product page in my app that has a single VueFormulate form and under it, there are multiple tabs. Now, if there is a validation error on the field on any of the inactive tabs, the user doesn't know about it. They have to go through all of the tabs to find which field has a validation error. To solve this, I can display an error message on top of the page saying that there are some errors on the "X" tab. Now, I have an Object where I keep which field belongs to which tab. Now, I need the information that which field is showing the validation error. Based on this information, I can easily tell the user to switch to the "X" tab to resolve the issue.

Please let me know how can I solve these issues.

Thanks.

@ravgeetdhillon ravgeetdhillon added the bug report A submitted bug report, not yet validated. label Jul 26, 2022
@ravgeetdhillon ravgeetdhillon changed the title Detect which form fields have validation issue Detect which form fields have validation error Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report A submitted bug report, not yet validated.
Projects
None yet
Development

No branches or pull requests

1 participant