forms-and-validation
Skill11 starsChanged 10 days agoMITView on GitHub
Use when building or reviewing forms, input components, client and server validation, submission flows, error handling, autofill or sensitive user-data collection.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- hi-donwi/Donwi-Skillstheir own version, first seen Nov 22, 2026
- Above-the-Fold-Studio/designmd-skillstheir own version, first seen Nov 1, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- Above-the-Fold-Studio/designmd-skills★ 0same name
- hi-donwi/Donwi-Skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository46 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- accessibility-automationSkill
- accessibility-reviewSkill
- accessible-componentsSkill
- accessible-motionSkill
- animation-performanceSkill
- anti-slop-uiSkill
- api-securitySkill
- authentication-sessionsSkill
- authorization-access-controlSkill
- component-engineeringSkill
- core-web-vitalsSkill
- design-directionSkill
- design-system-architectureSkill
- document-head-seoSkill
- font-performanceSkill
- frontend-architectureSkill
- gsap-fundamentalsSkill
- icon-engineeringSkill
- image-asset-optimizationSkill
- independent-reviewSkill
- interactive-storytellingSkill
- javascript-performanceSkill
- keyboard-focusSkill
- modern-cssSkill
- motion-design-systemsSkill
- network-cachingSkill
- performance-auditingSkill
- performance-testingSkill
- premium-landing-pagesSkill
- quickstart-onboardingSkill
- rendering-performanceSkill
- responsive-engineeringSkill
- screen-reader-testingSkill
- scrolltrigger-experiencesSkill
- secrets-configurationSkill
- secure-application-designSkill
- secure-input-outputSkill
- security-reviewSkill
- security-testingSkill
- semantic-accessibilitySkill
- visual-design-reviewSkill
- visual-reference-analysisSkill
- wcag-auditingSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
22 rules. About 0 are common, 22 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈22
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Use a real form, appropriate input types, visible labels and associated descriptions.
- Distinctive: line 23
Use buttons with explicit types.
- Distinctive: line 24
Do not use placeholder text as the only label or instruction.
- Distinctive: line 26
Use native constraints for basic browser feedback.
- Distinctive: line 30
Never trust hidden fields, disabled controls, client calculations or client-supplied role identifiers.
- Distinctive: line 36
Avoid announcing errors on every keystroke.
- Distinctive: line 41
Keep submit actions explicit.
- Distinctive: line 45
Use appropriate CSRF defenses for cookie-authenticated state-changing requests.
- Distinctive: line 46
Never submit state-changing operations through GET.
- Distinctive: line 47
Use HTTPS and secure session handling.
- Distinctive: line 49
Avoid placing sensitive data in URLs, analytics events, client logs or error messages.
- Distinctive: line 50
Do not log passwords, authentication tokens or full payment details.
- Distinctive: line 54
Use suitable mobile keyboards and autofill tokens.
- Distinctive: line 55
Keep controls usable with zoom, screen readers and touch input.
- Distinctive: line 57
Consider localization, date/number formats and right-to-left text where the product requires them.
- Distinctive: line 60
Test server rejection even when client validation is bypassed.
- Distinctive: line 61
Test duplicate submission, timeout, offline/network error and retry behavior.
- Distinctive: line 62
Verify keyboard and screen-reader announcements where test tools allow.
- Distinctive: line 82
Prefer native constraint validation for standard constraints.
- Distinctive: line 84
Do not announce the same error repeatedly while users are still typing.
- Distinctive: line 87
Test autofill, password managers, mobile input modes, browser back/forward and keyboard-only completion.
- Distinctive: line 89
Use visible, associated labels and actionable instructions.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Forms and Validation
Objective
Make forms understandable, accessible and resilient while treating all client-submitted data as untrusted. Client validation improves usability; server validation protects data and operations.
Workflow
- Define the data contract
- Identify each field's purpose, type, required status, allowed range and maximum length.
- Collect only information necessary for the task.
- Identify sensitive fields and retention requirements before implementation.
- Define server-side validation and authorization rules independently of the UI.
- Use native semantics
- Use a real form, appropriate input types, visible labels and associated descriptions.
- Group related controls with fieldset and legend where appropriate.
- Set correct name, autocomplete, inputmode, required, minlength, maxlength, min, max and pattern attributes when applicable.
- Use buttons with explicit types; do not nest forms.
- Do not use placeholder text as the only label or instruction.
- Validate at the right boundaries
- Use native constraints for basic browser feedback.
- Validate again on the server using trusted schemas or domain rules.
- Enforce authorization, ownership, rate limits and business rules server-side.
- Normalize values only when the domain contract defines the normalization.
- Never trust hidden fields, disabled controls, client calculations or client-supplied role identifiers.
- Give useful feedback
- Explain what is wrong and how to correct it.
- Associate field errors with controls using aria-describedby; set aria-invalid while invalid.
- Provide an error summary for long or multi-step forms.
- On failed submission, move focus to the summary or first invalid field when appropriate.
- Avoid announcing errors on every keystroke; validate on submit or after meaningful interaction.
- Preserve valid user input after recoverable failures.
- Handle submission states
- Show pending, success and failure states.
- Prevent accidental duplicate submissions without blocking native validation.
- Keep submit actions explicit; do not auto-submit merely because a select, checkbox or radio value changes.
- Make network failures retryable where safe and use idempotency for operations that may be repeated.
- Announce asynchronous results with an appropriate status region.
- Protect data
- Use appropriate CSRF defenses for cookie-authenticated state-changing requests.
- Never submit state-changing operations through GET; reserve GET for read-only requests.
- Use HTTPS and secure session handling.
- Apply output encoding or context-appropriate sanitization when displaying submitted content.
- Avoid placing sensitive data in URLs, analytics events, client logs or error messages.
- Do not log passwords, authentication tokens or full payment details.
- Apply server-side rate limiting and abuse controls to public endpoints.
- Support real users
- Support keyboard-only completion and visible focus.
- Use suitable mobile keyboards and autofill tokens.
- Keep controls usable with zoom, screen readers and touch input.
- Preserve values and validation state across responsive layouts.
- Consider localization, date/number formats and right-to-left text where the product requires them.
- Test end to end
- Cover valid, invalid, missing, boundary, malformed and unauthorized submissions.
- Test server rejection even when client validation is bypassed.
- Test duplicate submission, timeout, offline/network error and retry behavior.
- Verify keyboard and screen-reader announcements where test tools allow.
- Confirm sensitive values are absent from URLs, logs and analytics.
Common AI failure mode
Failure: An agent implements client-side validation and accessible error messages, then treats that browser validation as the authoritative security and business-rule boundary.
Why it matters: Attackers can bypass browser code and submit crafted requests directly. If the server trusts client-supplied values, ownership, permissions, prices, or workflow state, invalid or unauthorized operations can be accepted even though the visible form appears correct. This is a correctness and security failure, not merely a form UX defect.
Prevention: Keep the existing field-contract, accessible-feedback, submission-state, and end-to-end testing guidance; enforce schema, authorization, ownership, rate limits, and business rules again on the server. Test direct requests that bypass the UI, including malformed, boundary, duplicate, and unauthorized submissions. Preserve valid entries on recoverable server errors, map errors to fields, and verify that sensitive values do not enter URLs, logs, or analytics. Client validation improves usability; it never grants trust.
Completion criteria
The form has a clear data contract, semantic controls, accessible and actionable feedback, server-enforced validation and authorization, safe submission handling, and tests for both expected and adversarial input.
Validation and error interaction contract
For every field, document its label, instruction, accepted format, required/optional status, validation boundary and error message. Associate help and error text programmatically, and ensure instructions are available before submission as well as after an error.
- Prefer native constraint validation for standard constraints; if custom validation replaces browser messages, preserve equivalent keyboard, focus and announcement behavior.
- On submit failure, provide a concise summary linked to invalid fields and move focus only when doing so helps users recover.
- Do not announce the same error repeatedly while users are still typing; choose predictable validation timing.
- Preserve valid entries when the server rejects a submission. Map server field errors to relevant controls without exposing stack traces or internal rules.
- For multi-step forms, persist only what is necessary, explain session expiry and provide a safe recovery path.
- Test autofill, password managers, mobile input modes, browser back/forward and keyboard-only completion.
Use visible, associated labels and actionable instructions; ARIA relationships supplement rather than replace native labels. Server validation remains authoritative.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

