isValid method Null safety

  1. @override
bool isValid(
  1. String? value
)
override

checks the input against the given conditions

Implementation

@override
bool isValid(String? value) {
  return value!.length >= min && value.length <= max;
}