-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Bug - Input - Validation - First time validation doesn't show error #7558
Description
Bug, feature request, or proposal:
BUG - First time validation doesn't show error until you tab out.
Example:
An input that only admits one digit (pattern[0-9])
First time:
you write "Hello" and there is no error shown until you tab out.
Second time:
you erase "hello" and write "9" then the error disappear immediately
Third time:
you erase "9" and write again "hello" then the error appears immediately with no need of tabbing out.
What is the expected behavior?
Field show error from the first time you write an incorrect value. There is no need of tabbing out once.
What is the current behavior?
Field show error only after having tabbing out one time.
What are the steps to reproduce?
https://stackblitz.com/edit/material2-input-first-time-validation
What is the use-case or motivation for changing an existing behavior?
Inform the user immediately of an wrong field value with no distinction if you tab out once or not.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular: ~4.4.3
Material: 2.0.0-beta.11
OS: Win10
TypeScript: ~2.4.0
Browsers: All browsers