RequiredIf<T> constructor
Creates a new instance of the RequiredIf validation rule based on the equality of another field's value.
otherFieldName
: The name of the other field to compare equality against (required).equalTo
: The value to compare for equality against the other field's value (required).message
: A custom validation message (optional) to be displayed when the validation fails.
Implementation
RequiredIf(this.otherFieldName, {required this.equalTo, String? message})
: condition = null,
super(message);