-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Labels
EE12Jakarta EE12 release relatedJakarta EE12 release related
Description
Having the code as
@Valid
List<MyObject> stringsto apply cascading validation to the list elements is trailing from the BV 1.0 1.1 specs and in BV 2.0 the new way to define such constraints was introduced (using type argument annotations):
List<@Valid MyObject> stringsWe should highlight to the users that applying cascading validation in a "legacy-way" will not be supported anymore in future versions of the spec, and that
@Valid
List<MyObject> stringswould mean that cascading validation is applied to the container itself (i.e. to the list and its properties) rather than its elements. Implementations of the current spec are encouraged to warn their users about this planned change and guide them to migrate to the correct way of achieving this through the usage of a type argument annotation
Things to also update:
- Examples in https://jakarta.ee/specifications/bean-validation/3.1/jakarta-validation-spec-3.1.html#constraintdeclarationvalidationprocess-requirements-graphvalidation-examples make sure that the "traditional style" is now "discouraged" instead.
Metadata
Metadata
Assignees
Labels
EE12Jakarta EE12 release relatedJakarta EE12 release related