Since a possible mathematical term has already been provided in another answer, I will suggest something that be more applicable to English in general.
The two fields can be described (using an adjectival phrase) as conditionally required (or, conversely, conditionally optional).
Given two options, the first is required only if the second is left empty—and vice-versa.
Following are several example of this terminology.
From jsonSchema attribute conditionally required, asked by halvete at Stack Overflow:
In certain cases, I would like the messageVersion
field not to be mandatory. Is there any way to make the mandatory-ness of the this field conditional?
From Conditionally required property using data annotations, asked by DrCopyPaste at Stack Overflow:
But I want 'Name' field only to be required if 'DocumentType' is equal to 1 and 'Name2' only required if 'DocumentType' is equal to 2 .
From "40 CFR § 158.110 - Required and conditionally required data." at the Legal Information Institute:
(b) Data designated as “conditionally required” (CR) for products with a given use pattern are required by EPA to evaluate the risks or benefits of a product having that use pattern if the product meets the conditions specified in the notes accompanying the requirement. The determination of whether the data must be submitted is based on the product's use pattern, physical or chemical properties, expected exposure of nontarget organisms, and/or results of previous testing (for example, tier testing). Applicants must evaluate each applicable test note for the conditions and criteria to be considered in determining whether conditionally required data must be submitted.
From the discussion thread "conditionally required field" at Nintex:
Is it possible to make a field required based on another fields input at run time?
From "How to make a field conditionally required in Microsoft Dynamics GP 9.0" at Microsoft:
This article discusses a customization that can be used to make a field conditionally required in Microsoft Dynamics GP 9.0. When you make this customization, the User Defined 1 field must be set to a value if the customer is on hold.
In theory, in the case of the specific example in the question, it could be more precisely described as mutually conditionally required (since there are only two and they directly affect each other). However that longer phrase might sound rather awkward to some people.