adds validations for user class