Andy
Andy

Reputation: 2749

AngularJS Form Validation Not Working in Chrome

I'm having trouble getting angularjs form validation to work in Chrome. I have a super simple example plunker that illustrates the issue. If you enter non-numeric data into the box and click the button, it still says the form is valid in Chrome. But if you do that in Firefox, it shows it as invalid which is what I would expect. What's going on here?

Thanks,

Andy

Upvotes: 3

Views: 4967

Answers (1)

Atropo
Atropo

Reputation: 12531

Looks like a bug with AngularJS and Chrome, try to add required to the input and it should work:

<input type="number" step="any" name="someNumber" ng-model="someNumber" required />

Here's a plunker to test it.

This is the open issue on AngularJS.

Upvotes: 1

Related Questions