In Spring Boot you can use all JSR-303 Validation API by default (javax.validation.*
)
If you want to implement custom validation, just implement the interface org.springframework.validation.Validator
NB: here is a properties file that matches with the java class
Tested with Spring Boot 2.1.4