Skip to content

Validation failure not exposed next to binding failure for immutable form class [SPR-16841] #21381

Closed
@spring-projects-issues

Description

@spring-projects-issues

Masatoshi Tada opened SPR-16841 and commented

Immutable sample -> https://github.com/MasatoshiTada/spring-mvc-form-sample/tree/master/01-immutable
Mutable sample -> https://github.com/MasatoshiTada/spring-mvc-form-sample/tree/master/02-mutable

 

"Message" is constrained by @NotBlank and "Birthday" is constrained by @NotNull and @DateTimeFormat(pattern = "yyyy-MM-dd").

  1. Behavior of mutable sample
    Both values are validated (see "mutable.png")

  2. Behavior of immutable sample
    The only "Birthday" is validated (see "immutable.png")


Affects: 5.0.6

Reference URL: https://github.com/MasatoshiTada/spring-mvc-form-sample/blob/master/01-immutable/src/main/java/com/example/immutable/SampleForm.java

Attachments:

Issue Links:

Referenced from: commits 955665b

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions