/install form-validation
Form Validation
Validation combines correctness and UX: when errors appear, how they are announced, and how client rules match the server.
When to Offer This Workflow
Trigger conditions:
- Long forms, wizards, or multi-step checkouts
- Accessibility audits flagging unclear errors
- Mismatch between client-side “valid” and API rejection
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.).
Stage 1: Model & Schema
Goal: Single schema (Zod, Yup, JSON Schema) as source of truth; share with backend when feasible.
Stage 2: Rule Layers
Goal: Separate required/format rules from cross-field rules (e.g., date range); isolate async checks (username available) from fast inline validation.
Stage 3: UX Timing
Goal: Choose onBlur vs onSubmit per field; avoid shouting on every keystroke unless real-time feedback is a product requirement.
Stage 4: Accessibility
Goal: Associate errors with fields via aria-describedby; move focus to first error on submit; use live regions judiciously.
Stage 5: Async & Server Parity
Goal: Map API validation errors to fields; handle race conditions on slow networks; idempotent submit with dedupe if needed.
Stage 6: Testing
Goal: Unit-test schema; e2e critical paths including server error mapping.
Final Review Checklist
- Schema aligned or shared with server
- Validation timing and copy defined
- Accessible error patterns
- API errors mapped to UI
- Tests for schema and flows
Tips for Effective Guidance
- Server rules always win—document intentional client shortcuts.
- Pair with ux-writing for error microcopy.
Handling Deviations
- Wizards: validate per step and on final submit; persist drafts securely.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install form-validation - 安装完成后,直接呼叫该 Skill 的名称或使用
/form-validation触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Form Validation 是什么?
Deep form validation workflow—schemas, sync vs async rules, UX patterns, accessibility, and server parity. Use when building complex forms, multi-step wizard... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 160 次。
如何安装 Form Validation?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install form-validation」即可一键安装,无需额外配置。
Form Validation 是免费的吗?
是的,Form Validation 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Form Validation 支持哪些平台?
Form Validation 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Form Validation?
由 mike47512(@mike47512)开发并维护,当前版本 v1.0.0。