Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

input: md-maxlength validation doesn't happen on initialization #10320

@jessika

Description

@jessika

Actual Behavior:

  • What is the issue? * Using md-maxlength="MAX" on an input field that initializes to some value of length > "MAX", the md-maxlength validation does not happen, and the input field is considered valid.
  • What is the expected behavior? The input field to be considered invalid on initialization.

CodePen (or steps to reproduce the issue): *

  • CodePen Demo which shows your issue: http://codepen.io/jessika/pen/MJvxKE
  • Details: I created two input fields, one using md-maxlength for character limit validation, and one using ng-maxlength. Both have the same initial values and same character limit. You should be able to see that the field using md-maxlength is still valid and the field using ng-maxlength is marked invalid. I would expect that both fields be invalid.

Angular Versions: *

  • Angular Version: 1.5.5
  • Angular Material Version: 1.1.1, 1.1.0

Additional Information:

  • Browser Type: * Chrome
  • Browser Version: * 56.0.2924.76 (64-bit)
  • OS: * Ubuntu
  • Stack Traces: N/A

Shortcut to create a new CodePen Demo.
Note: * indicates required information. Without this information, your issue may be auto-closed.

Do not modify the titles or questions. Simply add your responses to the ends of the questions.
Add more lines if needed.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions