Can a field be conditionally required?

Can a field be conditionally required?

For instance, I have a 3 fields:

Allergy---- Dropdown- Yes/No- REQUIRED
Severity--- Dropdown- Mild, Moderate, Fatal- Not required on form load
Allergen--- Dropdown- Pollen, Bee, etc.- Not required on form load

Here's what I want:

IF Allergy is Yes, THEN require the Severity and Allergen fields

IF Allergy is No, then no change needed

This is necessary because if you make the Severity and Allergen fields required on form load and the Allergy is NO, then you don't need to fill them in.  But if the Allergy is Yes, then these must become required for patient safety.

Can I do this?