Skip to content

Instantly share code, notes, and snippets.

<alignment jcr:primaryType="nt:unstructured"
name="./alignChildren"
fieldLabel="Alignment of components"
required="{Boolean}true"
selectionMode="single"
sling:resourceType="granite/ui/components/coral/foundation/form/buttongroup">
<items jcr:primaryType="nt:unstructured">
<default jcr:primaryType="nt:unstructured"
name="./default"
@leolll
leolll / your.html
Created February 1, 2021 05:05
Radio button validation + iodine.js
<label for="password">Plan</label>
<input name="plan" type="radio" id="pro" value="pro" x-bind:class="{'invalid':plan.errorMessage}" data-rules='["requiredChoice:plan"]' data-server-errors='[]'>
<input name="plan" type="radio" id="basic" value="basic" x-bind:class="{'invalid':plan.errorMessage}" data-rules='["requiredChoice:plan"]' data-server-errors='[]'>
<p class="error-message" x-show.transition.in="plan.errorMessage" x-text="plan.errorMessage"></p>