Docs and custom error messages

Added some basic documentation and custom error messages for validation.