Add back `min` and `max` schema parameters
Closed this issue · 1 comments
tingerrr commented
Previously the number
, integer
, float
, string
, and array
schemas had the parameters min
and max
.
I propose adding these back, those range checks are fairly convenient, especially combined with z.<schema>.with(min: ...)
for schema adaption. The main downside of not having them now is that nested schema validation cannot perform easy length checks.
jamesrswift commented
As mentioned on discord, definitely agree. The last version where it existed was here:
Lines 61 to 83 in efd9a08
I'll make a branch and see about bringing this sort of way of handling it back