URI with query string without equals sign is flagged as invalid
Closed this issue · 1 comments
CBonnell commented
It appears that with version 0.24, URIs with a query string that do not contain an equals sign are flagged as invalid. This appears to be more strict than what RFC 3986, section 3.4 prescribes.
For example, http://www.foo.example?bar
is valid according to RFC 3986, but it is now flagged as invalid:
validators.url('http://www.foo.example?bar')
ValidationError(func=url, args={'reason': "bad query field: 'bar'", 'value': 'http://www.foo.example?bar'})
yozachar commented
validators/src/validators/url.py
Lines 122 to 133 in e79d75f
Please pass strict_query=False
. Query validation is performed internally by Python's parse_qs
function.