Provide a nice validation error message instead of a general site error. Fixes #9318