Added missing validations in the user model.