Open cuducos opened 2 years ago
The is_url and is_email in spidermon/contrib/validation/jsonschema/formats.py returns True is the input is anything but a string.
is_url
is_email
spidermon/contrib/validation/jsonschema/formats.py
True
Thus, dict(), 42, [42, {}, ('a', 'tuple')] would all be valid emails or URLs according to these logic.
dict()
42
[42, {}, ('a', 'tuple')]
Shouldn't these files read like this instead?
if not isinstance(instance, str_types): return False # …
The
is_url
andis_email
inspidermon/contrib/validation/jsonschema/formats.py
returnsTrue
is the input is anything but a string.Thus,
dict()
,42
,[42, {}, ('a', 'tuple')]
would all be valid emails or URLs according to these logic.Shouldn't these files read like this instead?