Improve method validation for container elements
This change moves container element properties from ParameterErrors to base class ParameterValidationResult, and makes that support independent of whether violations are nested within a container element bean or through constraints on container elements, e.g. `List<@NotBlank String>`. Closes gh-31887
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -128,7 +128,7 @@ public class HandlerMethodValidationExceptionTests {
|
||||
}
|
||||
else {
|
||||
MessageSourceResolvable error = new DefaultMessageSourceResolvable("Size");
|
||||
return new ParameterValidationResult(param, "123", List.of(error));
|
||||
return new ParameterValidationResult(param, "123", List.of(error), null, null, null);
|
||||
}
|
||||
})
|
||||
.toList());
|
||||
|
||||
Reference in New Issue
Block a user