Add test for a custom rule that is conditionally required