summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs/luci-static
diff options
context:
space:
mode:
Diffstat (limited to 'modules/luci-base/htdocs/luci-static')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/validation.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/validation.js b/modules/luci-base/htdocs/luci-static/resources/validation.js
index dbf30488c1..0544e2f680 100644
--- a/modules/luci-base/htdocs/luci-static/resources/validation.js
+++ b/modules/luci-base/htdocs/luci-static/resources/validation.js
@@ -221,7 +221,7 @@ var ValidatorFactory = L.Class.extend({
types: {
integer: function() {
- return this.assert(this.factory.parseInteger(this.value) !== NaN, _('valid integer value'));
+ return this.assert(!isNaN(this.factory.parseInteger(this.value)), _('valid integer value'));
},
uinteger: function() {
@@ -229,7 +229,7 @@ var ValidatorFactory = L.Class.extend({
},
float: function() {
- return this.assert(this.factory.parseDecimal(this.value) !== NaN, _('valid decimal value'));
+ return this.assert(!isNaN(this.factory.parseDecimal(this.value)), _('valid decimal value'));
},
ufloat: function() {