Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Number field validation broken #7936

Closed
stenlee opened this issue Jun 22, 2014 · 8 comments
Closed

Number field validation broken #7936

stenlee opened this issue Jun 22, 2014 · 8 comments

Comments

@stenlee
Copy link

stenlee commented Jun 22, 2014

Steps to reproduce: just try to fill non number chars in example at https://docs.angularjs.org/api/ng/input/input%5Bnumber%5D
and check validation result. In myForm.input.$error collection the "number" property is always false.

@VictorQueiroz
Copy link
Contributor

Try type "9.9999999999999999e+23" or type "99999999999999999999999999999999999999999999" and press the up button, and you will see.

@stenlee
Copy link
Author

stenlee commented Jun 22, 2014

I think it should validate as NOT number also NOT Numbers .... ex "abc"

@caitp
Copy link
Contributor

caitp commented Jun 22, 2014

you're right, obviously --- I think this is a regression though, either in Chromium or in angular --- because this was definitely working at the time this was checked in

@caitp
Copy link
Contributor

caitp commented Jun 22, 2014

I'm looking into it

@caitp
Copy link
Contributor

caitp commented Jun 22, 2014

Yeah I think I can write a fix for this quickly, I really, REALLY wish Ian had plotted the constraint validation api better :(

@stenlee
Copy link
Author

stenlee commented Jun 22, 2014

Thank you much Caitlin.

@caitp
Copy link
Contributor

caitp commented Jun 22, 2014

I'll see if that changes fixes the docs page once it builds on the CI server, I think it should

@caitp
Copy link
Contributor

caitp commented Jun 23, 2014

http://ci.angularjs.org/job/angular.js-caitlin/393/artifact/build/docs/api/ng/input/input%5Bnumber%5D (yes it will still incorrectly report 'required' error --- that is going to take a bit more work to fix, and that's been planned for a while)

@ealtenho ealtenho self-assigned this Jun 23, 2014
@caitp caitp closed this as completed in 1f6a5a1 Jun 24, 2014
ckknight pushed a commit to ckknight/angular.js that referenced this issue Jul 16, 2014
This CL improves mocking support for HTML5 validation, and ensures that it works correctly along
with debounced commission of view values.

Closes angular#7936
Closes angular#7937
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants