When the InputCheckbox in the Login.razor page of the Blazor Web App template project is replaced with HxCheckbox, an error message is displayed upon form submission:
The value 'on' is not valid for 'RememberMe'.
This occurs when the "Remember me" checkbox is checked and the "Log in" button is clicked. The likely cause of this issue is that HxCheckbox does not have a Value attribute set, which is necessary for binding the checkbox state to the model property. Below is a comparison of the HTML code rendered for both HxCheckbox and InputCheckbox:
Steps to Reproduce
Create a new project in Visual Studio using the Blazor Web App project template. In the wizard select Authentication Type: None, Interactive render mode: None, Interactivity location: Global.
Add the Havit.Blazor.Components.Web.Bootstrap NuGet package (version 4.6.8) to the project and configure it according to the Havit Getting Started Guide.
Replace the content of Home.razor with the code from the attached file Home.razor.txt (remove the .txt extension).
Run the application, check the Havit checkbox, and click Submit. The aforementioned error message will be displayed.
When the
InputCheckbox
in theLogin.razor
page of the Blazor Web App template project is replaced withHxCheckbox
, an error message is displayed upon form submission:This occurs when the "Remember me" checkbox is checked and the "Log in" button is clicked. The likely cause of this issue is that
HxCheckbox
does not have aValue
attribute set, which is necessary for binding the checkbox state to the model property. Below is a comparison of the HTML code rendered for bothHxCheckbox
andInputCheckbox
:Steps to Reproduce
Havit.Blazor.Components.Web.Bootstrap
NuGet package (version 4.6.8) to the project and configure it according to the Havit Getting Started Guide.Home.razor
with the code from the attached file Home.razor.txt (remove the.txt
extension).