Added a validator mixin class to add validations to models.