Install
openclaw skills install form-validationDeep form validation workflow—schemas, sync vs async rules, UX patterns, accessibility, and server parity. Use when building complex forms, multi-step wizards, or reducing validation bugs.
openclaw skills install form-validationValidation combines correctness and UX: when errors appear, how they are announced, and how client rules match the server.
Trigger conditions:
Initial offer:
Use six stages: (1) model & schema, (2) rule layers, (3) UX timing, (4) accessibility, (5) async & server parity, (6) testing). Confirm framework (React Hook Form, Formik, native, etc.).
Goal: Single schema (Zod, Yup, JSON Schema) as source of truth; share with backend when feasible.
Goal: Separate required/format rules from cross-field rules (e.g., date range); isolate async checks (username available) from fast inline validation.
Goal: Choose onBlur vs onSubmit per field; avoid shouting on every keystroke unless real-time feedback is a product requirement.
Goal: Associate errors with fields via aria-describedby; move focus to first error on submit; use live regions judiciously.
Goal: Map API validation errors to fields; handle race conditions on slow networks; idempotent submit with dedupe if needed.
Goal: Unit-test schema; e2e critical paths including server error mapping.