CSS-only validation using :user-valid / :user-invalid, plus JS-enhanced features via data-validate on forms.
Try it: Tab through fields without entering values, or enter invalid data, then move focus away. Validation appears only after you've interacted with each field. No JavaScript needed.
data-message-* attributes let you specify per-constraint error messages. The right message appears for the right validation failure — valueMissing vs typeMismatch vs tooShort get different text.
data-match links a field to another field's ID. The values must be equal. This is impossible with CSS/HTML alone.
data-min-checked and data-max-checked on a fieldset enforce how many checkboxes must be checked. Native HTML has no equivalent.
data-validate="summary" shows errors only in a top-level summary. Field-level <output class="error"> elements are hidden via CSS. Good for compact forms.
data-validate (no value, or "both") with an <output class="error-summary"> present shows both: a summary at the top AND inline errors on each field. Best for long forms.