Implemented validator attribute
Added tests for Attribute