You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have das-blog-core v8.0.1200 running on my Windows dev machine. My Windows language & region configuration is English (Netherlands) and regional format (Dutch). In this scenario the default value for the reCAPTCHA Minimum Score is initially set to 0,7 instead of 0.7. Which makes sense as the decimal symbol is a comma instead of a dot in the Netherlands. Pressing the save button without changing anything, triggers the validation that the value is incorrect. Changing the value manually to 0.7 works, but triggers a StackOverflowException (see issue #705)
Analysis of the generated HTML shows that the controller generates: <input type="text" value="0,7" ....> for this input field.
A good matching description of this problem is also described in: dotnet/aspnetcore#6566
It was however not easy to see how to apply to "correct" solution from this discussion to the das-blog-core source code.
The text was updated successfully, but these errors were encountered:
…string#706
Using type="number" will ensure that the decimal symbol is always a dot, which will prevent that the validation will fail when the server is running on a non en-us configuration.
The HTML input element type="number" also display a spinner, The default step size is 1, changed it to .1 to make the spinner useful.
Remark 1: the input element number also provides min/max settings to limit the user input. A custom HtmlHelperExtensions would be needed however to extract the range values from the model to set these values.
Adding min/max manuallly in the .cshtml file is also possible but would duplicate the configuration SiteViewModel. Client validation will also ensure the range, so no functionality is lost.
Remark 2: an alternative would be change the page to use ASP.NET Tag Helpers (asp-for), which is used in some other pages of DasBlog, but this change would be much larger.
Scenario:
I have das-blog-core v8.0.1200 running on my Windows dev machine. My Windows language & region configuration is English (Netherlands) and regional format (Dutch). In this scenario the default value for the reCAPTCHA Minimum Score is initially set to 0,7 instead of 0.7. Which makes sense as the decimal symbol is a comma instead of a dot in the Netherlands. Pressing the save button without changing anything, triggers the validation that the value is incorrect. Changing the value manually to 0.7 works, but triggers a StackOverflowException (see issue #705)
Analysis of the generated HTML shows that the controller generates: <input type="text" value="0,7" ....> for this input field.
A good matching description of this problem is also described in: dotnet/aspnetcore#6566
It was however not easy to see how to apply to "correct" solution from this discussion to the das-blog-core source code.
The text was updated successfully, but these errors were encountered: