Announcement Announcement Module
Collapse
No announcement yet.
Custom Validator Compatible With Annotation Based Validation For Spring 2.5 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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!

  • #2
    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

    Comment

    Working...
    X