Skip to content

max-length not valid for input type number #167

@hobadams

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

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