requireIfValue

Makes this option required if the referenced option's value matches the predicate. This creates a value-based conditional requirement.

Return

This builder for method chaining

Parameters

ref

Property reference to the option whose value triggers this requirement

predicate

Function that returns true if this option should be required