You can't embed control characters in URLs, though. Of course some web servers and web applications may blithely accept illegal unescaped control characters in URLs. If so, they're buggy.
if invalid(input):
log.warning('UberForm field wrong: ' + input)
(And many subtle variations thereof)