Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change RecaptchaMinimumScore from input text to number to solve #706 #710

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Nov 22, 2024

  1. Change RecaptchaMinimumScore from input text to number to solve poppa…

    …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.
    vbaderks committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    9ce0f16 View commit details
    Browse the repository at this point in the history