Returns true if the number of expanded items is within the allowed range.
bool validate(int length) => _min <= length && (_max == null || length <= _max);