adds validations for models