How to require one of two fields in dialog to be completed?
We have a component with icons links and each icon needs to have one of the following two fields completed:
- internalLink
- externalLink
Currently, authors can leave them both blank, which causes a broken link to a non-existent page. How can I write a validation rule that notifies the users that one of the two fields is required?
<internal-link
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/pathfield"
fieldDescription="Select internal link"
fieldLabel="Internal Link"
name="./internalLink"
rootPath="/content/attbusiness/en"/>
<external-link
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldDescription="Link to external page outside"
fieldLabel="External link"
name="./externalLink"/>