Closed avrahamshukron closed 6 years ago
There's a typo in the Length validator:
if self.minimum_value is not None and len_ > self.maximum_value:
Notice how self.miminum_value is checked for None-ness instead of self.maximum_value. This means that when setting max length alone, no validation is performed.
self.miminum_value
None-ness
self.maximum_value
When setting only the minimum you len_ > None gives an error, too
len_ > None
This is fixed in https://github.com/beregond/jsonmodels/pull/120 as well
There's a typo in the Length validator:
Notice how
self.miminum_value
is checked forNone-ness
instead ofself.maximum_value
. This means that when setting max length alone, no validation is performed.