Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-2592

@validator('formBeanValidator'... does not validate nested properties

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 7.0.4
    • Fix Version/s: 8.0.0
    • Component/s: Databind 2
    • Security Level: Jimmy
    • Labels:
      None

      Description

      the JSR-303 formBeanValidator does not iterate through nested form fields even if they are annotated with the @Valid annotation and have a Constraint on the nested property

      e.g.

      <intbox value="@bind(fx.age)" errorMessage="@load(vmsgs['p_age'])"/>  <!-- works -->
      <textbox value="@bind(fx.nameDto.name)" errorMessage="@load(vmsgs['p_nameDto.name'])"/>  <!-- does not work / not even sure about the syntax of 'p_????' -->
      

      the attached example is a running maven project showing this behaviour

        Activity

        Hide
        cor3000 cor3000 added a comment -

        a workaround is to manually use the beanValidator at field level
        e.g.:

        <textbox value="@bind(fx.nameDto.name) @validator('beanValidator')" errorMessage="@load(vmsgs[self])"/>
        
        Show
        cor3000 cor3000 added a comment - a workaround is to manually use the beanValidator at field level e.g.: <textbox value= "@bind(fx.nameDto.name) @validator('beanValidator')" errorMessage= "@load(vmsgs[self])" />
        Hide
        jumperchen jumperchen added a comment -

        Bug fixed since 2/26/2015.
        Fixed in 8.0.0 for the new form binding implementation, not fixed in the old version such as ZK 7.x version.

        Show
        jumperchen jumperchen added a comment - Bug fixed since 2/26/2015. Fixed in 8.0.0 for the new form binding implementation, not fixed in the old version such as ZK 7.x version.

          People

          • Assignee:
            jumperchen jumperchen
            Reporter:
            cor3000 cor3000
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: