Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
it should be possible to use custom types (+ converters for it) and constraints in such custom types should be validated if @Valid is used at the bound property.
cascaded validation should be performed if there is no violated constraint of the property itself.
example:
public class CustomType
{
@NotNull
private String property1;
@Size(min = 3)
private String property2;
public CustomType(String property1, String property2)
{ this.property1 = property1; this.property2 = property2; }public String getProperty1()
{ return property1; }public String getProperty2()
{ return property2; }}
public class MyBean
{
@NotNull
@Valid
private CustomType property;
public CustomType getProperty()
{ return property; }public void setProperty(CustomType property)
{ this.property = property; }}
//custom converter
//...
-> #
{myBean.property}