improve error reporting on invalid from/to fields