Is there a reason that you are validating only string values, and not unicode with the validate_str method? Are non-ASCII values prohibited in urls?
Also, it would be better to use:
if not isinstance(val, str): (or even: if not isinstance(val, basestring): if unicode should be allowed)
... instead of: if type(val) != str
« Back to merge proposal
Is there a reason that you are validating only string values, and not unicode with the validate_str method? Are non-ASCII values prohibited in urls?
Also, it would be better to use:
if not isinstance(val, str):
(or even: if not isinstance(val, basestring): if unicode should be allowed)
... instead of:
if type(val) != str