Added tests and documentation around validation.

* Added another exception that is raised when an unknown attribute is
  encountered.
* Expanded validate() for #8. This fixes #8.