Files
spring-boot-demo/validation/output/03-custom-constraints.txt
T

21 lines
669 B
Plaintext

== @CaseCheck(UPPER) "abc", @CaseCheck(LOWER) "abc"
upper: Wrong letter case
== a null value passes the custom rule
(no violations)
== short spam message
message: Message contains 'spam' and must be at least 50 characters long.
== long message containing spam
(no violations)
== a composed constraint with @Target(FIELD) only, used on a record component
name: must not be blank
== validator with a constructor-injected bean, username admin
username: That username is taken
== same object, validator built by hand without Spring
ValidationException: HV000064: Unable to instantiate ConstraintValidator: com.ankurm.validation.constraint.AvailableUsernameValidator.