Add validation module: Bean Validation on Spring Boot 4.2.0 with Hibernate Validator 9.1.6, built-in and custom constraints, groups, method validation, ProblemDetail errors, message i18n, JPA integration and tests, with real transcripts
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b4RzcCS5JCAgcxLz7T
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
== @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.
|
||||
Reference in New Issue
Block a user