Commit de08bae
fix(validation): improve minLength error message to include actual string length
When a string fails minLength validation, the previous error always said
'got empty string' even when the string was non-empty but too short.
Now the message distinguishes the two cases:
- empty string: 'expected string with minLength N, got empty string'
- short string: 'expected string with minLength N, got string of length M'
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 904f5fc commit de08bae
2 files changed
Lines changed: 22 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1815 | 1815 | | |
1816 | 1816 | | |
1817 | 1817 | | |
1818 | | - | |
| 1818 | + | |
| 1819 | + | |
1819 | 1820 | | |
1820 | 1821 | | |
1821 | 1822 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1338 | 1338 | | |
1339 | 1339 | | |
1340 | 1340 | | |
1341 | | - | |
| 1341 | + | |
1342 | 1342 | | |
1343 | 1343 | | |
1344 | 1344 | | |
1345 | 1345 | | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
1346 | 1365 | | |
1347 | 1366 | | |
1348 | 1367 | | |
| |||
0 commit comments