Closed Qorxi closed 4 years ago
@Qorxi thanks for contacting us.
@SteveSandersonMS you are the expert here. Can you take a look?
<button type="submit" class="btn btn-primary" @onclick="@HandleSave">Yadda saxla</button>
This button triggers HandleSave
regardless of validation.
Instead, remove the @onclick
handler from here, so it is just a <button type="submit">
with no click handler. Your <EditForm>
will then receive the "submit" event and trigger either OnValidSubmit
on OnInvalidSubmit
.
@Qorxi thanks for contacting us.
@SteveSandersonMS you are the expert here. Can you take a look? @javiercn You are welcome, I applied due to the problem I faced.
<button type="submit" class="btn btn-primary" @onclick="@HandleSave">Yadda saxla</button>
This button triggers
HandleSave
regardless of validation.Instead, remove the
@onclick
handler from here, so it is just a<button type="submit">
with no click handler. Your<EditForm>
will then receive the "submit" event and trigger eitherOnValidSubmit
onOnInvalidSubmit
.
Thanks, the problem has been resolved but I think there is a problem in this part because any event triggered within the edit form should be checked with this logic because it is within the edirform, otherwise it can cause such incomprehensibility.
This issue has been resolved and has not had any activity for 1 day. It will be closed for housekeeping purposes.
See our Issue Management Policies for more information.
Hello. The problem is that, on the basis of the model given EditForm, there are validation errors in including invalid model internal propositions, but the OnValidSubmit operation is performed regardless of the model being invalid.
The codes in the problem part are as follows. The application was made with ASP.NET Core 3.2 version.