Skip to content
New issue

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

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

Already on GitHub? # to your account

max-length not valid for input type number #167

Open
hobadams opened this issue May 19, 2022 · 0 comments
Open

max-length not valid for input type number #167

hobadams opened this issue May 19, 2022 · 0 comments

Comments

@hobadams
Copy link

hobadams commented May 19, 2022

Issue

the max-length property is not valid for input type number.

Screenshot 2022-05-19 at 09 38 45

Solution

Something like this (just an idea).

const textInputs = ['email', 'password', 'search', 'tel', 'text', 'url'];
let maxLength = null

if (textInputs.includes(input.type)) {
maxLength = 'existing logic here'
}
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant