isValid method

  1. @override
bool isValid(
  1. S state
)
override

Implementation

@override
bool isValid(S state) {
  switch (state) {
    case String():
      return state.length <= value;
    case Iterable():
      return state.length <= value;
    default:
      return false;
  }
}