Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Custom validation annotation in Spring

This sample Spring Boot application contains examples of how to create custom constrain annotations (like e.g. @NotNull) with corresponding validator classes.

Each subpackage of com.dolszewski.blog presents a different use case.

  1. basic - The most simple constrain that can be created.
  2. parametrized - A plain constrain with an additional custom attribute.
  3. multitype - A constrain applicable to several different types.
  4. crossfield - A constrain which verifies several class fields