...
This commit is contained in:
@@ -42,14 +42,9 @@
|
||||
|
||||
<div class="signin-banner-from-box">
|
||||
|
||||
<EditForm EditContext="editContext" OnValidSubmit="SubmitVerificationCode">
|
||||
|
||||
@* <EditForm EditContext="editContext" OnValidSubmit="SubmitVerificationCode"> *@
|
||||
|
||||
<DataAnnotationsValidator />
|
||||
<div class="postbox__comment-input mb-35">
|
||||
<ValidationMessage For="()=>VerificationCodeModel.Code" />
|
||||
|
||||
</div>
|
||||
<EditForm Model="VerificationCodeModel" OnSubmit="SubmitVerificationCode" FormName="VerificationCodeDto">
|
||||
|
||||
|
||||
<div class="row">
|
||||
@@ -66,6 +61,8 @@
|
||||
|
||||
</EditForm>
|
||||
<div class="row">
|
||||
|
||||
|
||||
<label style="color:red">
|
||||
@Error
|
||||
</label>
|
||||
@@ -82,20 +79,15 @@
|
||||
</main>
|
||||
|
||||
@code {
|
||||
private EditContext? editContext;
|
||||
private ValidationMessageStore? messageStore;
|
||||
|
||||
|
||||
public string Error{ get; set; }
|
||||
[Parameter]
|
||||
public int ID { get; set; }
|
||||
|
||||
[SupplyParameterFromForm]
|
||||
public VerificationCodeDto? VerificationCodeModel { get; set; } = new VerificationCodeDto();
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
editContext = new EditContext(VerificationCodeModel);
|
||||
messageStore = new(editContext);
|
||||
base.OnInitialized();
|
||||
}
|
||||
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
@@ -134,15 +126,13 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Error = "خطای سیستمی رخ داده";
|
||||
}
|
||||
|
||||
|
||||
// nav.NavigateTo($"Verification/{res}");
|
||||
}
|
||||
else
|
||||
{
|
||||
nav.NavigateTo($"/");
|
||||
Error = await request.Content.ReadFromJsonAsync<string>();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user