Description
Bug, feature request, or proposal:
Bug
What is the expected behavior?
Any invalid input should show an error state, regardless of type.
What is the current behavior?
Constraints on number input type don't cause mat-input to present as invalid.
What are the steps to reproduce?
In the text input, you can violate a constraint (e.g., type 1 character with min-length of 2) and the input will turn red, showing the embedded mat-error, as it's supposed to. I'm not able to type or paste more characters than the max-length, but I believe that programatically setting the value longer would cause an error, and that would also display correctly.
On my browser (Chrome latest, Windows), the number input includes spinner arrows, and using these or the arrow keys, the number is correctly constrained between the min and max values. However, you are allowed to type any digits you want (including a negative sign) and this means you can violate the validation parameters. In the StackBlitz, you can type "-2" or "1000", and the input's validity state is correctly updated, but the field styling never changes and embedded mat-errors are never shown.
What is the use-case or motivation for changing an existing behavior?
Input fields with a number should show errors like anything else does.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Everywhere, as far as I can tell.
Is there anything else we should know?
It's possible that this is an issue with core Angular Forms, rather than something specific to Material2.