HV000271: Using @Valid on a container (java.util.List) is deprecated. You should apply the annotation on the type argument(s).
Open
@jiholee17 is already working on this.
Since Sep 14, 2026.
enhancement
- Dominant language
- Kotlin
- Stars
- 217
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
When upgrading to spring boot 4.1, I encountered the warning that @Valid is deprecated on containers (https://docs.hibernate.org/validator/9.1/whats-new/en-US/html_single/#_jakarta_ee_11). I currently use annotations in my graphql schema as follows:
input WorkplaceInput
{
employees: [EmployeeInput!]
@annotate(name: "jakarta.validation.Valid")
}
input EmployeeInput
{
name: String!
@annotate(name: "jakarta.validation.constraints.Pattern", inputs: {regexp: "^[a-zA-Z]{2,64}$"})
}
Is there a way to achieve the same validation on employees without applying @Valid to the list of employees? Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.