ValidatorFn typedef

ValidatorFn = Map<String, dynamic>? Function(AbstractControl c)

Returns a map of the errors associated with this control.

Each entry in the map is a separate error associated with the control. The key is an identifier for the error while the value is additional information used by the component to display the error. For instance a length validator could provide information about how long the current invalid string is and the max string length for the input to display.

Implementation

typedef ValidatorFn = Map<String, dynamic>? Function(AbstractControl c);