AddThisFeature

Inline Validation

Tell people what's wrong before they hit submit.

simple Forms & Input

What it adds

Field-level validation that catches problems early without nagging.

What your agent is told to do

4
  1. 1

    Validate on blur, not on every keystroke — validating while someone is still typing their email is hostile.

  2. 2

    Once a field has errored, re-validate as they fix it so the error clears immediately.

  3. 3

    Say what is wrong AND how to fix it. 'Invalid' is not an error message.

  4. 4

    Keep server-side validation as the source of truth. Client-side validation is a convenience, never a security boundary.

Edge cases it handles

4
  • Submitting must still surface server-side errors the client didn't catch.
  • The first errored field must receive focus on a failed submit.
  • Async validation (is this username taken?) must be debounced and must not block submit forever.
  • Errors must survive a failed submit — never clear the user's input.

Definition of done

8
  • Fields validate on blur, not per keystroke.
  • Errors clear as soon as they're fixed.
  • Messages explain how to fix the problem.
  • Server-side validation still runs and its errors are shown.
  • Errors are tied to inputs with aria-describedby and announced.
  • A failed submit never discards what the user typed.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.