Change RecaptchaMinimumScore from input text to number to solve #706 #710
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.