Skip to content

Commit 1ade3e0

Browse files
committed
fix step validations
1 parent 832b62a commit 1ade3e0

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ See [contributing guide](.github/CONTRIBUTING.md)
136136

137137
| Date | Version | Description |
138138
| ----------- | ------- | ----------- |
139-
| 2018-02-12 | v1.1.0 | Add support for step validations using big.js for more accurate calculations |
139+
| 2018-02-12 | v1.1.2 | Add support for step validations using big.js for more accurate calculations |
140140
| 2018-02-01 | v1.0.38 | Link function of the provided service will only be called once to prevent memory leaks |
141141
| 2016-07-11 | v0.0.27 | Service can now provide min/max/step values and template values override service values |
142142
| 2016-06-14 | v0.0.22 | Published via NPM (in addition to bower) |

angular-number-input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@
450450
* @returns {Boolean} true if valid
451451
*/
452452
ngModelCtrl.$validators.step = function (modelValue) {
453-
return (step === undefined || isNaN(modelValue) || isNaN(step) || validateStep(modelValue, step));
453+
return (typeof modelValue !== 'number' || typeof step !== 'number' || isNaN(modelValue) || isNaN(step) || validateStep(modelValue, step));
454454
};
455455

456456
/**

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-number-input",
3-
"version": "1.1.0",
3+
"version": "1.1.2",
44
"description": "AngularJS number input directive.",
55
"authors": [
66
"Sagie Gur-Ari <sagiegurari@gmail.com>"

docs/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
| Date | Version | Description |
22
| ----------- | ------- | ----------- |
3-
| 2018-02-12 | v1.1.0 | Add support for step validations using big.js for more accurate calculations |
3+
| 2018-02-12 | v1.1.2 | Add support for step validations using big.js for more accurate calculations |
44
| 2018-02-01 | v1.0.38 | Link function of the provided service will only be called once to prevent memory leaks |
55
| 2016-07-11 | v0.0.27 | Service can now provide min/max/step values and template values override service values |
66
| 2016-06-14 | v0.0.22 | Published via NPM (in addition to bower) |

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-number-input",
3-
"version": "1.1.0",
3+
"version": "1.1.2",
44
"description": "AngularJS number input directive.",
55
"author": {
66
"name": "Sagie Gur-Ari",

0 commit comments

Comments
 (0)