返回顶部
f

form-validation

Deep 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.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
97
下载量
1
收藏
概述
安装方式
版本历史

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.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 form-validation-1776028576 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 form-validation-1776028576 技能

通过命令行安装

skillhub install form-validation-1776028576

下载 Zip 包

⬇ 下载 form-validation v1.0.0

文件大小: 1.76 KB | 发布时间: 2026-4-13 10:21

v1.0.0 最新 2026-4-13 10:21
form-validation 1.0.0 – Initial release

- Introduces a deep form validation workflow covering schema modeling, validation rule layering, UX/error display timing, accessibility, async/server parity, and testing.
- Includes a six-stage process: (1) schema, (2) rule layers, (3) UX, (4) accessibility, (5) async/server parity, (6) testing.
- Provides when-to-use guidelines, server/client parity tips, and a final checklist for implementation quality.
- Emphasizes accessibility, error mapping, and parity between frontend validation and backend rules.
- Suggests best practices for wizard forms and integrating with UX writing.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部