fixed missing DataAnnotationValidator in AboutMe

This commit is contained in:
Mia Rose Winter 2024-01-20 17:56:07 +01:00
parent 428b462371
commit 8371f131b9
Signed by: miawinter
GPG key ID: 4B6F6A83178F595E

View file

@ -7,37 +7,38 @@
@inject IStringLocalizer<Wave.Components.Account.Pages.Manage.Index> Localizer @inject IStringLocalizer<Wave.Components.Account.Pages.Manage.Index> Localizer
<EditForm FormName="about-me" Model="@Model" OnValidSubmit="OnValidSubmit" method="post" class="w-full"> <EditForm FormName="about-me" Model="@Model" OnValidSubmit="OnValidSubmit" method="post" class="w-full">
<label class="form-control w-full"> <DataAnnotationsValidator />
<div class="label"> <label class="form-control w-full">
<span class="label-text"> <div class="label">
@Localizer["AboutTheAuthor_Label"] <span class="label-text">
<HelpDropdownComponent Body="@Localizer["AboutTheAuthor_Explanation"]" /> @Localizer["AboutTheAuthor_Label"]
</span> <HelpDropdownComponent Body="@Localizer["AboutTheAuthor_Explanation"]"/>
</div> </span>
<InputTextArea class="textarea textarea-bordered w-full h-24" maxlength="512" </div>
@bind-Value="@Model.AboutTheAuthor" placeholder="@Localizer["AboutTheAuthor_Placeholder"]" /> <InputTextArea class="textarea textarea-bordered w-full h-24" maxlength="512"
<div class="label"> @bind-Value="@Model.AboutTheAuthor" placeholder="@Localizer["AboutTheAuthor_Placeholder"]"/>
<span class="label-text-alt text-error"><ValidationMessage For="() => Model.AboutTheAuthor" /></span> <div class="label">
</div> <span class="label-text-alt text-error"><ValidationMessage For="() => Model.AboutTheAuthor"/></span>
</label> </div>
<label class="form-control w-full"> </label>
<div class="label"> <label class="form-control w-full">
<span class="label-text"> <div class="label">
@Localizer["Biography_Label"] <span class="label-text">
<span class="badge badge-info badge-sm badge-outline">Markdown</span> @Localizer["Biography_Label"]
<HelpDropdownComponent Body="@Localizer["Biography_Explanation"]" /> <span class="badge badge-info badge-sm badge-outline">Markdown</span>
</span> <HelpDropdownComponent Body="@Localizer["Biography_Explanation"]"/>
</div> </span>
<InputTextArea class="textarea textarea-bordered w-full h-48" maxlength="4096" </div>
@bind-Value="@Model.Biography" placeholder="@Localizer["Biography_Placeholder"]" /> <InputTextArea class="textarea textarea-bordered w-full h-48" maxlength="4096"
<div class="label"> @bind-Value="@Model.Biography" placeholder="@Localizer["Biography_Placeholder"]"/>
<span class="label-text-alt text-error"><ValidationMessage For="() => Model.Biography" /></span> <div class="label">
</div> <span class="label-text-alt text-error"><ValidationMessage For="() => Model.Biography"/></span>
</label> </div>
</label>
<button type="submit" class="btn btn-primary w-full"> <button type="submit" class="btn btn-primary w-full">
@Localizer["Submit"] @Localizer["Submit"]
</button> </button>
</EditForm> </EditForm>
@code { @code {