Available since v0.1.0
fs-trigger="blur"
StableFires on the native blur event (via focusout capture so it reaches the instrumented element). Use for validation and "user finished with this field" semantics.
Syntax
<input type="email"
fs-assert="signup/validate-email"
fs-trigger="blur"
fs-assert-updated=".email-field[classlist=valid:true]">
When to use it
- Field-level validation that runs after the user leaves the field
- Save-on-blur semantics (inline edit, autosave)
- "Did the user actually finish?" gates on form sections
Example
<input type="text" name="username"
fs-assert="signup/check-username"
fs-trigger="blur"
fs-assert-visible-available=".username-available"
fs-assert-visible-taken=".username-taken">
Pairs well with
fs-assert-updated— field marks itself valid/invalidfs-assert-visible— a validation message appears- Conditional assertions — branch on
availablevstaken [value-matches=...]— verify the committed value via self-referencing
Gotchas
- Blur on text inputs also triggers
change. If you have both ablurtrigger and achangetrigger on the same field, both fire when the user leaves. Pick one. - Click-on-submit patterns lose focus. Clicking a submit button blurs the input — the blur assertion fires alongside the submit.
See also
focus— the complementary triggerchange— commit-semantics alternative- Triggers index