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