isValid method

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

Checks whether a non-empty value satisfies the validation criteria.

Override this in subclasses with the specific validation logic. It is never called with empty input — call resolves that beforehand.

Implementation

@override
bool isValid(String value) => value.trim().runes.length <= max;