Skip to content

max-length not valid for input type number #167

Description

@hobadams

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions