setting the rules before validating