created rules for validator