fullstackhero / blazor-wasm-boilerplate

Clean Architecture Boilerplate Template for .NET 6.0 Blazor WebAssembly built for FSH WebAPI with the goodness of MudBlazor Components.

Home Page:https://fullstackhero.net/blazor-webassembly-boilerplate/general/getting-started/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EntityTable update and create fluentvalidation errors not show

jcarlosmanuel opened this issue · comments

commented

Hello, when creating or updating a record, the fluentvalidation errors are not shown, I made a modification to the ApiHelper both methods, to obtain those errors and show them, they consider that the change is correct

catch (ApiException ex)
{
if (ex.Result.Errors is not null)
{
customValidation?.DisplayErrors(ex.Result.Errors);
foreach (var item in ex.Result.Errors)
{
snackbar.Add(item.Value.FirstOrDefault(), Severity.Error);
}
}
else
{
snackbar.Add("Something went wrong!", Severity.Error);
}
}

thanks I wait for the answer