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

Define "any" step value for "number" fields #98

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

dtrucs
Copy link
Contributor

@dtrucs dtrucs commented Jul 1, 2024

The integer fields have a step attribute set to 1.
But number fields have no step attribute set, so in the case where the form is submitted with <input name="foo" type="number" required /> with a decimal value, html validation prevents submission.

One solution is to define a noValidate attribute for the form tag, but we lose the ultimate validation of the form.
Another solution is to define a step="any" for numbers fields.

Ref https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number#step

@bhch bhch merged commit 93316b8 into bhch:master Jul 3, 2024
@bhch
Copy link
Owner

bhch commented Jul 3, 2024

Hello thanks for the PR. I've merged it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants