updateErrors method
Implementation
void updateErrors(Map<String, List<String>> errors) {
for (var key in formResult.keys) {
if (errors.containsKey(key)) {
formResult[key]!.errors = errors[key] ?? [];
formResult[key]!.success = false;
formResult[key]!.failed = true;
formResult[key]!.error = formResult[key]!.errors.join(',');
formResult[key]!.errorHtml = formResult[key]!.errors.join('<br/>');
formResult[key]!.valid = 'is-invalid';
success = false;
}
}
}