How to use conditionally required fields