Validation errors

Human-readable error messages are only placeholders for now. Also, this uses the literal set syntax from Python 3.x. You may need to change {...} to set(...) in order to regain Python <2.7 compatibility.