Commit 605cb9b
committed
fix: improve error messages in deep_iterable and deep_mapping validators
When inner validators fail, the error message now includes the index/key
of the failing element instead of just the parent attribute name.
Before: "Length of 'x' must be >= 1: 0"
After: "Length of 'x[1]' must be >= 1: 0"
This makes it clear which element in the iterable/mapping failed validation.
Fixes #12451 parent 25b74d6 commit 605cb9b
1 file changed
+17
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
347 | | - | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
348 | 353 | | |
349 | 354 | | |
350 | 355 | | |
| |||
399 | 404 | | |
400 | 405 | | |
401 | 406 | | |
402 | | - | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
403 | 412 | | |
404 | | - | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
405 | 418 | | |
406 | 419 | | |
407 | 420 | | |
| |||
0 commit comments