react-code-input icon indicating copy to clipboard operation
react-code-input copied to clipboard

max-length not valid for input type number

Open hobadams opened this issue 3 years ago • 0 comments

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'
}

hobadams avatar May 19 '22 09:05 hobadams