Commit 16ebe33
authored
fix: Add validation and consistent data structure for survey 'Other' options (#5620)
## Summary
- Added validation to prevent users from proceeding when "Other" is
selected but text input is empty
- Changed data structure to send consistent string values to database
instead of mixed objects
- Both useCase and industry now send user input directly when "Other" is
selected
## Changes
- Added `useCaseOther` field and input to survey form
- Updated `validStep2` to validate useCaseOther when useCase is 'other'
- Modified submit payload to send string values consistently for both
useCase and industry fields
## Test plan
- [x] Select "Other" for use case without filling input → Next button
disabled
- [x] Select "Other" for industry without filling input → Next button
disabled
- [x] Fill in "Other" text inputs → Next button enabled
- [x] Submit survey with "Other" selections → Payload sends user input
as string values
🤖 Generated with [Claude Code](https://claude.ai/code)
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-5620-fix-Add-validation-and-consistent-data-structure-for-survey-Other-options-2716d73d3650811faa6efc547db14930)
by [Unito](https://www.unito.io)1 parent 108ad22 commit 16ebe33
1 file changed
+23
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
83 | 90 | | |
84 | 91 | | |
85 | 92 | | |
| |||
243 | 250 | | |
244 | 251 | | |
245 | 252 | | |
| 253 | + | |
246 | 254 | | |
247 | 255 | | |
248 | 256 | | |
| |||
265 | 273 | | |
266 | 274 | | |
267 | 275 | | |
268 | | - | |
| 276 | + | |
| 277 | + | |
269 | 278 | | |
270 | 279 | | |
271 | 280 | | |
| |||
290 | 299 | | |
291 | 300 | | |
292 | 301 | | |
293 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
294 | 309 | | |
295 | 310 | | |
296 | 311 | | |
| |||
314 | 329 | | |
315 | 330 | | |
316 | 331 | | |
317 | | - | |
| 332 | + | |
318 | 333 | | |
319 | 334 | | |
320 | | - | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
321 | 339 | | |
322 | 340 | | |
323 | | - | |
| 341 | + | |
324 | 342 | | |
325 | 343 | | |
326 | 344 | | |
| |||
0 commit comments