Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed fail_fast behavior for typ lists
if a type is specified as a list, then the data should be validated against each element in the list and be considered valid if item succeeds. the validate_type function does this by catching exceptions with a try/except block until one schema validates. however, if fast_fail is turned off, then exceptions are not thrown immediatly, they are instead placed in a list to be thrown later. this caused the loop through possible schemas to exit after the first schema, even if it was not valide. however, the first schema would still put an error in the _errors list if it was not valid. so, if the first schema raised an exception, its exception would be placed in the esception list and the types loop would not catch it, exiting immediatly. then, even if a valid schema did exist at some point later in the list, the validate function would report an error. this fix monitors the _errors list to handle the above situation correctly.
- Loading branch information