requiredIf<T> static method
Creates a RequiredIf validation rule.
This rule checks if a value is required based on a condition where the value
of another field is equal to equalTo
. It can include a custom validation message.
Implementation
static ValidationRule<T> requiredIf<T>(String? otherFieldName,
{dynamic equalTo, String? message}) =>
RequiredIf<T>(otherFieldName, equalTo: equalTo, message: message);