Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

As alternative there is an add-on for Spring 3 and the BV integration (= ExtVal validation module) to allow typesafe dependency injection in constraint validators.

Mapped Constraint Source

The concept is similar to @JoinValidation (provided by the property-validation module. However, this version is more type-save and it is supported by the property- as well as the bean-validation module.

Since both modules support the same syntax you will find further information here.

Extended Support of @Valid

The std. integration of BV in JSF 2.0 doesn't allow to continue the validation within CustomType. So ExtVal offers an additional feature which allows using @javax.validation.Valid for custom types.

Code Block
java
java
titleAdvanced @Valid example

public class CustomType
{
    @NotNull
    private String property1;

    @Size(min = 3)
    private String property2;

    //+ getter-/setter-methods
}

public class CustomBean
{
    @NotNull
    @Valid
    private CustomType property;

    //+ getter-/setter-methods
}

If you are providing a custom converter, you can access the property via customBean.property and all constraints (including the constraints within CustomType) will be validated.