Skip to content

Empty maxlength fails validation #2047

Open
@locomo

Description

@locomo

Subject of the issue

Error thrown on text inputs when maxlength attribute has no value:
"Please enter no more than 0 characters."

Your environment

  • 1.16.0
  • Safari 10.1.2, Chrom 58

Steps to reproduce

https://jsfiddle.net/t80x2L2a/

Input fields with maxlength attribute but no value fail validation

Expected behaviour

If maxlength attribute has no value then it should not (and cannot) be compared to the length of the field

Actual behaviour

length is compared to param (length <= param) but this will always return false if param is empty

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy