Added some doc blocks.
Added some simple validation checks, which throw exceptions. These exceptions are caught and the controller can pass the invalid attributes to the view. Need to add in some messaging so the attribute type can do more advanced validation (e.g. max length, file type etc)