validate method

String? validate()

Validates the current text and returns an error message if invalid, or null if valid.

Implementation

String? validate() => validator?.call(_text);