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
When a request payload is a JSON array, the validator throws an flask_validator.exceptions.ValidatorAttributeError: ('AttributeError', 'json passed, expecting json or form_data or query_string or headers')
JSON Arrays are converted to list and the validator does not validate list.
Say my JSON payload is:
[ 5, 6, 7, 8]
it throws:
File "/Users/chumaumenze/Documents/projects/flask-validator/flask_validator/validator_engine.py", line 49, in validate
validation_result = validators[validator_name](data.get(field, None),\
AttributeError: 'list' object has no attribute 'get'
. . . .
File "/Users/chumaumenze/Documents/projects/flask-validator/flask_validator/validator_engine.py", line 35, in inner_wrapper
raise ValidatorAttributeError('AttributeError',\
flask_validator.exceptions.ValidatorAttributeError: ('AttributeError', 'json passed, expecting json or form_data or query_string or headers')
The text was updated successfully, but these errors were encountered:
When a request payload is a JSON array, the validator throws an
flask_validator.exceptions.ValidatorAttributeError: ('AttributeError', 'json passed, expecting json or form_data or query_string or headers')
JSON Arrays are converted to list and the validator does not validate list.
Say my JSON payload is:
it throws:
The text was updated successfully, but these errors were encountered: