form-validation
यह क्या करती है
यह स्किल फ़ॉर्म validation जाँचती है ताकि त्रुटि संदेश सही फ़ील्ड्स से जुड़े हों। यह उन डेवलपर्स के लिए है जो required या checked inputs वाले फ़ॉर्म बनाते हैं।
कब इस्तेमाल करें
- ✓जब फ़ॉर्म में ऐसी त्रुटियाँ दिखें जिन्हें स्क्रीन रीडर उपयोगकर्ता ढूँढ न सकें।
- ✓जब required फ़ील्ड्स सहायक टूल्स के लिए चिह्नित न हों।
- ✓जब त्रुटि सिर्फ़ लाल बॉर्डर दिखाए और कोई संदेश न हो।
Skill का लिंक
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/form-validation/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप मेरे फ़ॉर्म के त्रुटि संदेश स्क्रीन रीडर उपयोगकर्ताओं के लिए साफ़ बना सकते हैं?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट जाँचता है कि त्रुटि टेक्स्ट हर फ़ील्ड से जुड़ा है और अमान्य स्थितियाँ चिह्नित हैं। वह inline संदेश, required चिह्न और समूहित विकल्पों के लिए fieldset सुझाता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Validate forms accessibly
Inaccessible form validation leaves screen reader users unable to understand what went wrong and how to fix it, causing frustration and form abandonment.
Quick Reference
- Associate error messages with fields using aria-describedby
- Use aria-invalid to indicate validation state
- Mark required fields programmatically with
requiredoraria-required - Provide inline error messages near the field
- Don't rely solely on color to indicate errors
- Keep help text and error text linked to the field throughout validation
Check
Verify forms have client-side validation with accessible error messages linked to form fields via aria-describedby. Do not flag React forms just because they omit method or action when onSubmit clearly handles submission client-side. Confirm required fields are exposed programmatically and grouped controls use fieldset and legend.
Fix
Implement validation with clear error messages, aria-invalid states, and aria-describedby references to error text. For client-handled forms, improve validation semantics without forcing server-post patterns that the component is not using. Add required or aria-required where appropriate and use <fieldset> with <legend> for grouped choices.
Explain
Explain how accessible form validation improves user experience and ensures all users can understand and correct errors.
Code Review
Review templates, server-rendered HTML, and shared components that output markup related to Validate forms accessibly. Flag exact elements, attributes, and routes where the rendered HTML violates the rule. Check that help text and error text are both included in aria-describedby and that required state is exposed in markup, not only in visual styling.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/html/form-validation
अक्सर पूछे जाने वाले सवाल
aria-describedby क्या करता है?
यह फ़ील्ड को उसके त्रुटि या सहायता टेक्स्ट से जोड़ता है, ताकि स्क्रीन रीडर संदेश को फ़ील्ड के साथ पढ़े।
क्या अकेला रंग त्रुटि दिखाना चाहिए?
नहीं। स्किल कहती है कि त्रुटि दिखाने के लिए सिर्फ़ रंग पर निर्भर न रहें।
क्या यह React फ़ॉर्म को भी उसी तरह देखती है?
स्किल कहती है कि React फ़ॉर्म को सिर्फ़ method या action न होने के लिए चिह्नित न करें, जब वे सबमिशन कोड में संभालते हों।
जानकारी
लेखक का मूल विवरण
Use when reviewing templates, rendered HTML, or shared components related to Validate forms accessibly. Validate the final browser-facing markup, not just the source framework abstraction. Distinguish between browser-posted forms and client-handled React forms so you do not over-report missing `method` or `action` as accessibility defects.
लोकप्रियता
- GitHub स्टार
- 75k
- रैंकिंग में स्थान
- #2859
- लाइसेंस
- MIT
- अपडेट की गई
- 31/10/2026
कमेंट
- …
इस repository की और skills
frontendchecklist
75kकमांड-लाइन टूल से फ़्रंटएंड कोड और लाइव पेजों को एक्सेसिबिलिटी, स्पीड, SEO और सिक्योरिटी के 380 से ज़्यादा नियमों से जाँचती है।
frontend-checklist-global
75kफ़्रंटएंड प्रोजेक्ट को Front-End Checklist के सभी 386 नियमों से ऑडिट करती है, और हर मिली समस्या का ठोस समाधान देती है।
404-page
75kजाँचती है कि आपका गुम पेज उपयोगी लिंक देता है और सही 404 स्टेटस लौटाता है, ताकि भटके हुए विज़िटर रास्ता ढूँढ सकें।
about-page
75kजाँचती है कि आपकी साइट पर एक साफ़ About पेज है जो बताता है कि उसे कौन चलाता है, ताकि विज़िटर और सर्च इंजन का भरोसा बढ़े।
मिलती-जुलती skills
angular-developer
280kआपके एजेंट को Angular code बनाने और प्रोजेक्ट स्ट्रक्चर पर सलाह देने में मदद करता है। नए प्रोजेक्ट शुरू करने, code के हिस्से बनाने, या performance और accessibility सुधारने में उपयोगी है।
frontend-a11y
280kआपके एजेंट को web interfaces को सबके लिए accessible बनाने में मदद करता है। यह सुनिश्चित करता है कि websites और apps screen readers और keyboard navigation के साथ अच्छे से काम करें।
frontend-patterns
280kआपके एजेंट को React और Next.js में frontend development के modern patterns लागू करने में मदद करता है। यह performance optimize करता है, state manage करता है और best practices फॉलो करवाता है।