Skip to content

Latest commit

 

History

History
11 lines (9 loc) · 850 Bytes

README.md

File metadata and controls

11 lines (9 loc) · 850 Bytes

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