requiredIfCondition<T> static method

ValidationRule<T> requiredIfCondition<T>(
  1. bool condition()?, {
  2. String? message,
})

Creates a RequiredIf validation rule based on a condition.

This rule checks if a value is required based on a provided condition function. It can include a custom validation message.

Implementation

static ValidationRule<T> requiredIfCondition<T>(bool Function()? condition,
        {String? message}) =>
    RequiredIf.condition(condition, message: message);