Skip to content
Devix Open Source

Validation

validate() cleans up what it keeps and refuses the rest — no extra UI, no invalid tag ever added.

Live preview
<form class="demo" onsubmit="event.preventDefault()">
  <div class="demo-field">
    <label class="demo-label" for="emails">Invite by email <span class="demo-hint">· anything that isn’t an address is refused</span></label>
    <input id="emails" name="emails">
    <p class="demo-hint" id="note">Try “aisha@example.com”, then “not-an-email”.</p>
  </div>
  <p class="demo-out" id="out">No invitations yet</p>
</form>