return (cbi_validators.integer(v) && (v >= 0));
},
+ 'float': function(v)
+ {
+ return !isNaN(parseFloat(v));
+ },
+
+ 'ufloat': function(v)
+ {
+ return (cbi_validators['float'](v) && (v >= 0));
+ },
+
'ipaddr': function(v)
{
return cbi_validators.ip4addr(v) || cbi_validators.ip6addr(v);
return false
end
-function uint(val)
+function uinteger(val)
local n = tonumber(val)
if n ~= nil and math.floor(n) == n and n >= 0 then
return true
return false
end
-function int(val)
+function integer(val)
local n = tonumber(val)
if n ~= nil and math.floor(n) == n then
return true
return false
end
+function ufloat(val)
+ local n = tonumber(val)
+ return ( n ~= nil and n >= 0 )
+end
+
function float(val)
return ( tonumber(val) ~= nil )
end