Commit 341f81a
fix: add field validation to CardQuery model for proper 422 responses (Closes stayforge/Stayforge_Networks_Access#9)
CardQuery.number was a plain str with no constraints, so invalid input
(e.g., overly long strings) would pass validation and hit the database,
returning 404 instead of 422. Added max_length=128, min_length=1, and
alphanumeric pattern validation to match CardModel constraints.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 134a447 commit 341f81a
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
0 commit comments