Details
-
New Feature
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
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:
- on the field of a content block provider. For example:
- edit the "hap:venueprovider" compound type
- add the hap:validationdatescompound and save changes
- open /hippo:namespaces/hap/venueprovider/hipposysedit:nodetype/hipposysedit:nodetype/validationdatescompound and add the property hipposysedit:validators = ["dates-in-sequence"]
- edit the Christmas Tree document
- add a validationdatescompound as a "Venue"
- the dates should now be validated to be in sequence
- on the type of a compound (like a document-level validator, but then for compounds)
- open /hippo:namespaces/hap/validationdatescompound/hipposysedit:nodetype/hipposysedit:nodetype and add the property hipposysedit:validators = ["dates-in-sequence"]
- edit the Christmas Tree document
- add a validationdatescompound as a "Venue"
- 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
- includes
-
CHANNELMGR-2361 Implement compound validators for content blocks
- Closed