Validator typedef
Signature of a validator function.
Returns an error message when value is invalid, or null when valid.
Matches Flutter's FormFieldValidator<String> so composed validators can
be passed directly to a TextFormField.validator.
Implementation
typedef Validator = String? Function(String? value);