-
Notifications
You must be signed in to change notification settings - Fork 27.5k
input type="number" is valid when a non numeric value is entered in IE 11 #7070
Comments
I can look into this later today (but if you can debug this, I would suggest looking at this glob of text, this is probably where the problem is) |
It seems to enter the if statement from the glob in both Chrome and IE, but the ValidityState object is different in IE. I don't know if this helps at all... Chrome ValidityState IE 11 ValidityState |
If you're entering letters in a number input, and IE is not setting badInput to true, then they're not behaving consistently with the spec (for better or worse, some of the things in that spec are kind of nonsense). But even so, the regexp should be invalidating it. |
My bad @ badInput, I was testing this inside an ng-grid and got slightly different results there, outside the grid badInput is undefined. Same behavior still though. |
I can confirm that this is happening. Unfortunate as it is, I don't think there's much we can really do about it. On Thu, Apr 10, 2014 at 9:17 AM, brik [email protected] wrote:
|
Ok, that's a shame. Thanks for looking into it anyway. |
I don't think this is really fixable on Angular's side, but I have raised an issue about this with MS at https://connect.microsoft.com/IE/feedback/details/850187/html5-constraint-validation-is-broken-in-ie11-for-input-type-number --- If people +1 it, maybe that could be fixed for the next iteration. I don't know. I will leave this issue open and possibly revisit it later |
Tracked in #10981 with more info |
When entering text or a combination of text and numbers, form.number.$valid" does not always validate to false.
Examples:
"ddd" validates to true (not OK)
"ddd3" validates to true (not OK)
"3ddd" validates to false
"33" validates to true
When using the required attribute, it works as expected.
Tested OK in Chrome and Firefox 28.0
Plnkr: http://plnkr.co/edit/uqOkCPxNYQWg8xog1IKi?p=preview
Looks like it is a similar issue to #2144
The text was updated successfully, but these errors were encountered: