Validate
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initFieldValidate(el) on the mounted element instead.
Paste into Claude, ChatGPT or Cursor after filling in {{USER_STACK}}, {{USER_STYLING}} and {{USER_CONSTRAINTS}}. Neutral keeps the greys you see here; Match my project asks the model to map them onto your own colour tokens.
Install with shadcn
Needs a free account token. Get a token
npx shadcn@latest add @movin/input-validateAbout this component
A right-side icon morphs between states: invisible on idle, a checkmark springs in on valid email format, an X shakes in on invalid submission attempt.
Triggers
- Focus
- State change
Techniques
- Transform only
- Keyframes
Difficulty
Intermediate
Accessibility
Keyboard and screen readers
Error state communicated via aria-invalid and visible text.
Reduced motion
Icon shake removed under prefers-reduced-motion.
Use it in anything you build, commercial and client work included. Licence
More inputs
See all5 of 8 · it heats while you type, Enter brands it
7 of 14 · Enter boxes it
5 of 20 · sets in 8 s · Enter pours a new slab