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

$error.number not working as expected. #4857

Closed
@vdclouis

Description

@vdclouis

Demo see official docs:
http://docs.angularjs.org/api/ng.directive:input.number

<form name="myForm" ng-controller="Ctrl">
  Number: <input type="number" name="input" ng-model="value" min="0" max="99" required>
  <span class="error" ng-show="myForm.input.$error.required">Required!</span>
  <span class="error" ng-show="myForm.input.$error.number">Not valid number!</span>
</form>

"Required!" is shown when there's nothing in the input field.
But "Not valid number!" is not when entering text, negative numbers or number greater than 99.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions