maxSelected<T extends Iterable<G>, G> static method

ValidationRule<T> maxSelected<T extends Iterable<G>, G>(
  1. int min, {
  2. String? message,
})

Creates a MaxSelected validation rule.

This rule checks if the number of selected items in an iterable is less than or equal to max. It can include a custom validation message.

Implementation

static ValidationRule<T> maxSelected<T extends Iterable<G>, G>(int min,
        {String? message}) =>
    MaxSelected<T, G>(min, message: message);