Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-6815

No validation errors shown for multiFields

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Medium
    • None
    • 6.2.11
    • None
    • None

    Description

      Steps to reproduce

      1. Create a (page) dialog with a jcrMulti(Value)Field
      2. Add another field as it's child e.g. linkField
      3. Add a validator to the linkField
      4. Enter content that does not match the validator 
      5. No error is shown, but the form won't submit (atleast that's good)

      Expected results

      We expect to see an error message just like other field that are not directly below a multifield

      Actual results

      No error is shown

      Workaround

      n/a

       

      Field configuration: 

       products:
            $type: jcrMultiValueField
            required: true
            field:
              $type: linkField
              textInputAllowed: true
              filteringMode: CONTAINS
              showOptions: true
              required: true
              datasource:
                $type: jcrDatasource
                workspace: products
                describeByProperty: displayName
                allowedNodeTypes:
                  - client:productCategory
                  - client:productLine
                  - client:decorSet
                  - client:decor
                  - client:finish
              validators:
                requiresCategory:
                  $type: nodePropertyValidator
                  propertyName: jcr:primaryType
                  pattern: ^client:finish$
                  errorMessage: validators.requiresNodeType.errorMessage
       

       Custom validator used:

      The custom validator used is attached, feel free to add it to the product if it satisfies needs. 
      But it's not needed to reproduce the issue, (required also fails). 
      The reason we're using the custom validator is to make sure the chooser shows the content tree completely to preserve the tree structure, but we only allow the deepest level (finish in this case).

       

       

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                jvanderheide Jeffrey van der Heide
                Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD