Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-11793

Implement compound validators for content blocks

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 13.3.0
    • None
    • None
    • 5
    • Tiger
    • Tiger Sprint 209, Tiger Sprint 210

    Description

      Currently it is not possible to trigger specific compound validators for added content blocks. For example, when the hap:validationdatescompound is added as a content block, it's not possible to trigger the "dates-in-sequence" validator for this added block.

      There are two places where such a "dates-in-sequence" validator could be added:

      1. on the field of a content block provider. For example:
        1. edit the "hap:venueprovider" compound type
        2. add the hap:validationdatescompound and save changes
        3. open /hippo:namespaces/hap/venueprovider/hipposysedit:nodetype/hipposysedit:nodetype/validationdatescompound and add the property hipposysedit:validators = ["dates-in-sequence"]
        4. edit the Christmas Tree document
        5. add a validationdatescompound as a "Venue"
        6. the dates should now be validated to be in sequence
      2. on the type of a compound (like a document-level validator, but then for compounds)
        1. open /hippo:namespaces/hap/validationdatescompound/hipposysedit:nodetype/hipposysedit:nodetype and add the property hipposysedit:validators = ["dates-in-sequence"]
        2. edit the Christmas Tree document
        3. add a validationdatescompound as a "Venue"
        4. the dates should now be validated to be in sequence

      Option 2 relies on the presence of document validators (otherwise validators cannot be configured on type level). Once that is done, people can either configure per-field validators (e.g.  /hippo:namespaces/hap/validation/hipposysedit:nodetype/hipposysedit:nodetype/twodates/hipposysedit:validators = ["dates-in-sequence"] or per-type validators (e.g. /hippo:namespaces/hap/validationdatescompound/hipposysedit:nodetype/hipposysedit:nodetype/hipposysedit:validators = ["dates-in-sequence"]. In the first case validators are only run for that particular field. In the second case validator are run for all fields of that type.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mmetternich Michael Metternich
              Product Management Team Product Management Team
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: