ValidationException.multipleFields constructor

ValidationException.multipleFields({
  1. bool silent = false,
  2. Map<String, List<String>>? validationMessages = const {},
})

Constructon for creating validation messages list separated by property

Implementation

ValidationException.multipleFields({
  bool silent = false,
  this.validationMessages = const {},
}) : super(
        silent: silent,
        messages: validationMessages != null
            ? validationMessages.entries
                .map<List<String>>(
                  (mapEntry) => mapEntry.value,
                )
                .toList()
                .expand<String>((list) => list)
                .toList()
            : [],
      );