validator property

(String? Function(TimeOfDay? value)?) validator
final

The validator passed to the text input. Returns a string containing an error message.

By default, the input checks for invalid hour or minute values. It also checks for null values unless requirementLevel is set to ZetaFormFieldRequirement.optional

If the default validation fails, errorText will be shown. However, if validator catches any of these conditions, the return value of validator will be shown.

Implementation

final String? Function(TimeOfDay? value)? validator;