We have developed an internet bank project in our company. We have used spring-mvc in this project and all of property validations have been carried out using Hibernate validator. However for some of our services that have a state-machine nature, we need to use spring-webflow.
In doing so we need to validate models in spring webflow without adding any extra validators. As you know There are 2 ways to validate a model programmatically:
- Define validation logic in the model object.
- Define a separate object called Validator to validate the model.
However, we DO NOT want to use none of these validation techniques.
For example lets imagine we had a Class named Customer. We used annotation validation for the properties in this class in our project. Now, we want to use this class as a model in view states in our webflow.
I was wondering if someone could help us how to validate models in spring webflow using annotation validation with hibernate validator.