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

Field Validation on the frontend #116

Open
Khizar-Hussian opened this issue Jan 19, 2022 · 0 comments
Open

Field Validation on the frontend #116

Khizar-Hussian opened this issue Jan 19, 2022 · 0 comments

Comments

@Khizar-Hussian
Copy link

On Primero 2.0 all the front end form fields are validated in the back end, after the save button is pressed and then the feedback/errors are populated at the bottom of the form. When the user has edited multiple forms, this poses an issue, as the errors for the prior forms get aggregated after validation, and get displayed at the bottom of the form the user is currently editing.

This problem can be alleviated by adding validation to some of the front-end fields. For instance, child's age bracket validation can be done on spot, it shouldn't have to be sent to the back-end for validation.

We would like to know if this is possible on V2, if so, what is the recommended method for adding those field validations, and where do we add them. Another thing we would like to know is how can we make the errors pop up immediately while the user is still in the relevant form. We would like to make these changes forward compatible as to not break the functionality when we inevitably migrate to a newer version, say 2.3.

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

No branches or pull requests

1 participant