Enhanced the application's service layer by adding FormValidationService and EventDefinitionService to the dependency injection container in Program.cs. Updated Create, Edit, and other relevant components to utilize these services for improved form validation and event processing functionality.
25 lines
608 B
Plaintext
25 lines
608 B
Plaintext
@namespace WebApp.Components.Shared.Components
|
|
@using MudBlazor
|
|
|
|
@if (Errors != null && Errors.Any())
|
|
{
|
|
<MudAlert Severity="Severity.Error" Class="mb-4">
|
|
<MudText Typo="Typo.h6" Class="mb-2">Please fix the following validation errors:</MudText>
|
|
<ul style="margin: 0; padding-left: 20px;">
|
|
@foreach (var error in Errors)
|
|
{
|
|
<li>@error</li>
|
|
}
|
|
</ul>
|
|
</MudAlert>
|
|
}
|
|
|
|
@code {
|
|
/// <summary>
|
|
/// List of validation error messages to display
|
|
/// </summary>
|
|
[Parameter]
|
|
public List<string>? Errors { get; set; }
|
|
}
|
|
|