I'm trying to understand how people work to factorize validations definition in Angular / Spring Boot context.
I wonder about several things :
- In angular, fields can appear in multiple forms across the app. How to define once for all the constraints for these given fields ? Externalize in a a property file ? A custom validator for ALL inputs of our app (sick) ? Something else ?
- We need to validate front side and back-end side. How to ensure front and back-end are using the same constraints ? How to do not do the job twice, which is error prone.
If you have a feedback about this, it would be appreciated.
Thank you
-
-