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:
Claude
2026-12-05 16:18:03 +05:30
parent a95f042051
commit 417903fbc2
78 changed files with 2279 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
== new ProductRequest(id=null, name=" ", price=-5)
validate(p) price: must be greater than 0
validate(p, OnCreate) name: must not be blank
validate(p, OnUpdate) id: must not be null | name: must not be blank
validate(p, Default, OnUpdate) id: must not be null | name: must not be blank | price: must be greater than 0
validate(p, Update extends Default) price: must be greater than 0
== @GroupSequence({Default, Expensive}): name blank, password short
name: must not be blank
== same sequence once the name is fixed
password: size must be between 8 and 2147483647
== cascade: nested rule is in OnUpdate, parent validated with Default
@Valid (no violations)
@Valid @ConvertGroup line.id: must not be null