validator

Declarative field rules — inline errors, no JS to write

The common rules — try submitting empty (live)

At least 10 characters, with an uppercase letter, a lowercase letter and a special character.

The rules

  • Validation is DECLARATIVE: validate on the form + validate-* attributes on fields; you write no validation JS. Submit fires validator:submit only when everything passes.
  • Errors render INLINE at the field (message under it, is-invalid on the control) — never alerts, never toasts (UI elements).
  • Custom texts per rule via validate-*-message; check/radio groups put the rules on the FIRST input and the error lands after the group.
  • New-password fields take validate-password — the house policy (10+ characters; up to 20 also an uppercase, a lowercase and a special character; over 20 length alone counts). The error says exactly what is missing.
  • SERVER validation closes the loop: a save's data.fields lands on the same fields through former — one look for both sides.
  • Docs: templates/app/docs/libs/validator.md; every rule live: /tests/validator.