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
In the doc, it's mentioned that validating an empty list [] will return true.
To do that, you need Schema(Or({int:int}, {})). This is unlike what happens with lists, where Schema([int]).is_valid([]) will return True.
What is the best way to disallow this? The best thing I can think of now is to import Use and call something that raises an error if nonempty. However, this isn't good for anything recursive.
The text was updated successfully, but these errors were encountered:
In the doc, it's mentioned that validating an empty list
[]
will return true.What is the best way to disallow this? The best thing I can think of now is to import
Use
and call something that raises an error if nonempty. However, this isn't good for anything recursive.The text was updated successfully, but these errors were encountered: