A function which takes in an error map, and returns another modified errors map.
typedef ErrorFn = Map<String, dynamic> Function(Map<String, dynamic> errors);