@Valid and nested objects

Description

Why we need to put `@Valid` annotation on class properties and properties of property?

1 2 3 4 5 6 7 8 9 10 11 12 13 14 class Address { @Size(min=3) String country String; } class SingUp { String email; @Size(min=8, max=40) String password; @Valid // why do we need to put this annotation ? Address address; }

Can this be added automatically? So, no need to put `@Valid` on every property that is a class or list.

Related issue https://github.com/micronaut-projects/micronaut-core/issues/1457

Environment

None

Status

Assignee

Unassigned

Reporter

Alex Rust

Labels

None

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Priority

Major