Implement front-end form validation
Closed this issue · 0 comments
hugopeek commented
The current FormIt validation is sufficient, but things would greatly improve if there's an additional validation layer in front of that.
A few benefits:
- Immediate feedback, instead of after a refresh
- Refresh comes with the problem of loosing focus of your form (unless you use an anchor in the form action, but that has other side effects)
- You can use specific input validation, such as formatting for phone numbers or credit card details
- It might solve the issue of validating fields that are only required based on another input value (such as alternative address) or inputs inside collapsible sections. The backend issue is here: hugopeek/romanesco-patterns#32
- It might be easier to add validation parameters through the CBs this way