This page lists all examples that are available, and new ones will be added in the future. Examples are in addition of the normal documentation, they do show you the basic ideas on using the framework. But for details you should really read the general documentation. For a lot more examples you can also check out the unit tests that ship in the distributions.
Some examples have different pages for different versions of JaValid, make sure to pick the right one in that case.
JaValid Core Example 1: Basics
This example shows you the usage of the framework using the core library only (can be used in any Java application).
JaValid Core Example 2: Groups
This example shows you how to use different groups for validation using the core library only (can be used in any Java application).
JaValid Core Example 3: Inheritance
This example shows you how inheritance validation can be used in JaValid using the core library only (can be used in any Java application).
Core Example 4: @LovConstraint (basics)
This example shows you the basics on how to use the @LovConstraint annotation, which is a very powerful annotation if used properly (this can be used in any Java application).
JaValid Core/Spring Example 5: @LovConstraint (dynamic)
This example shows you the advanced usage of @LovConstraint. It shows how to use normal POJO’s as lookup beans and how to use Spring beans as lookup beans (both deliver the input for the lov constraint).
JaValid Core/JSF Example 6: Using AnnotationValidator directly
This example shows you how to use the AnnotationValidator in a direct way, which is quite common if you want full control of your validation and the framework only does parts of the validation. The real complex validation must generally be coded by hand. Using this approach you can mix the validation any way you like.
JaValid Core Example 7: Custom validation annotation
This example shows you how to create a new validation annotation, how to implement its validation and how to register it with JaValid.
JaValid Core Example 8: Automatic message resolving
This example shows you how to use the automatic message resolving of validation messages.