Uploaded image for project: 'MyFaces Extensions Validator'
  1. MyFaces Extensions Validator
  2. EXTVAL-96

support for custom types via @Valid

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.2.4, 2.0.4, 1.1.4
    • Bean Validation
    • 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}

      Attachments

        Activity

          People

            Unassigned Unassigned
            szambrovski@gmail.com Simon Zambrovski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: