You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i don't think any of both behaviours was intended.
nonetheless i'd consider the recent as 'correct'. you can either extend your regex and dismiss the nullable-rule or implement #102 for a more clever coercion.
The behaviour changed:
ID_SCHEME = {'_id' :{'type':'string', 'coerce':str, 'regex': r'[0-9abcdef]{24}', 'required':True, 'nullable':True}}
_id = {'_id':None}
v = Validator()
print(v.validate(_id, ID_SCHEME))
print(v.errors)
in version 9 this gives:
True
{}
and in version 10 the same gives:
False
{'_id': "value does not match regex '[0-9abcdef]{24}'"}
Is this intended change?
The text was updated successfully, but these errors were encountered: