Add before and after validation rule.