Dec 15th, 2010, 02:57 AM
Custom Validator Compatible With Annotation Based Validation For Spring 2.5
Hello, I've done a annotation based validation approach using Spring 2.5. The command object field variables now carry annotations such as @Email and @NotBlank. These work well. For this I followed this (http://wheelersoftware.com/articles/...framework.html). However, we need to do a custom implementation of an annotation. Such as @Factorial. I understand that for this, I need to define an annotation using @interface keyword.
However, what annotations should I a validation annotation class with?
How do I tell it where the implementation class of the validator is?
And, what class do I extend in the validator?
Thanks in advance!
Mar 11th, 2011, 12:22 AM
Hibernate Validator documentation
The documentation for Hibernate Validator has a very good section on writing custom validation annotations: http://docs.jboss.org/hibernate/stab...nstraints.html
Tags for this Thread