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
Use(bool) will return True for strings that should be false.
t = Schema({"test_bool": Use(bool)})
t.validate({"test": "false"})
the code above will return {'test': True}
I would recommend using distutils.util.strtobool to convert strings to booleans. This will convert things like "TRUE", "True", "true", "T", 1 to True and it will convert "FALSE", "False", "false", "F", "f", 0 to False.
The text was updated successfully, but these errors were encountered:
Use(bool)
will return True for strings that should be false.the code above will return
{'test': True}
I would recommend using
distutils.util.strtobool
to convert strings to booleans. This will convert things like"TRUE", "True", "true", "T", 1
to True and it will convert"FALSE", "False", "false", "F", "f", 0
to False.The text was updated successfully, but these errors were encountered: