Closed lukKowalski closed 8 years ago
Material doesn't do any number validations/limitations on the user input. I believe only Angular marks it as invalid.
@crisbeto I agree. Also on every browser, you can type e in the number input.
This seems to be intentionally, but I haven't figured the why yet.
It might be because of the exponential notation in JS (e.g. 1.00001e+32
).
@crisbeto its not only because of JS, its because of global use in math :)
@crisbeto @DevVersion ok, actually it is a browser-level problem. Safari handles type="number" differently and allows to write also other characters instead of numbers only. To block it you have to write custom event handler.
On safari browser it is possible to write letters inside when its marked as type="number". Can be tested at official ng-material page at input section - "Donation amount" at the bottom of the page https://material.angularjs.org/latest/demo/input