Created a validator with rules on the user model.