replaced validation functions with validation errors raised on create and update functions