I have an application using Spring, JPA (Hibernate) and Java validation framework (Hibernate Validator). I would like to be able to annotate the fields in our domain model, which are allowed to contain HTML, and automatically disinfect them at the time of fixing. Does anyone know a smart way to do this?
I tried using the validation framework, but this does not support changing the field value during validation. I could hack things in order for something to work, but I hope for a cleaner solution.
source
share