# AI से React form validation debug करें

form bug input, validation और submit handler के बीच हो सकता है। असली files और दोहराने के steps दें। सबसे छोटा cause-based fix माँगें, फिर गलत input और valid submission दोनों को जाँचें।

## आपका brief

1. expected, actual behavior, repro और redacted error दें। चुनी branch का input, schema और submit handler दिखाएँ।

   ____________________

2. empty, whitespace, format, length और accessibility नियम लिखें। client और server validation अलग समझें।

   ____________________

3. test environment और destination पहचानें, secrets नहीं। सफल flow की जरूरी शर्त बताएँ।

   ____________________

## Prompt

[files और repro] से React form debug करें। cause और minimal diff दें। empty, whitespace, malformed input, keyboard, accessible errors, duplicate click और network failure देखें। server validation और authorization बचाएँ। उपलब्ध relevant tests के असली results दें; न चले checks को suggested कहें।

## काल्पनिक उदाहरण

केवल spaces वाली string non-empty check से गुजरती है। normalization validation और submit में consistent करें, पर meaningful spaces वाला field न बिगाड़ें। empty, spaces, valid और failed request जाँचें। unit test पास होना email delivery का प्रमाण नहीं।

## जाँच सूची

- [ ] क्या diff reproduced cause ठीक करता और input semantics बचाता है?
- [ ] क्या invalid input, keyboard, duplicate और recovery जाँचे हैं?
- [ ] क्या source test, destination check और production अलग बताए हैं?

error गायब करने के लिए validation न हटाएँ। server checks authoritative रहें। debug में sensitive form values log या store न करें।

---

Brainbaby · https://brainbaby.ai/hi/blog/ai-react-form-validation-debug-hindi

CC BY 4.0 — https://creativecommons.org/licenses/by/4.0/
