Closed
Description
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").
-
Behavior of mutable sample
Both values are validated (see "mutable.png") -
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:
- immutable.png (82.00 kB)
- immutable-20180717.png (54.22 kB)
- mutable.png (87.24 kB)
- mutable-20180717.png (23.37 kB)
Issue Links:
- Cannot create BindStatus for valid field on immutable form object in case of bind errors [SPR-16449] #20994 Cannot create BindStatus for valid field on immutable form object in case of bind errors
- Validation is not executed when type conversion failed on immutable form [SPR-17235] #21768 Validation is not executed when type conversion failed on immutable form
- spring-webflux ModelAttributeMethodArgumentResolver validateIfApplicable [SPR-17073] #21611 spring-webflux ModelAttributeMethodArgumentResolver validateIfApplicable
- @RequestBody validation kotlin support improvement [SPR-17085] #21622
@RequestBody
validation kotlin support improvement - No type-based error code used by immutable form class when type conversion error occurs [SPR-16854] #21394 No type-based error code used by immutable form class when type conversion error occurs
Referenced from: commits 955665b