* Core translation
[project/luci.git] / libs / core / luasrc / util.lua
index 343c627..11f7720 100644 (file)
@@ -276,20 +276,6 @@ function updfenv(f, extscope)
 end
 
 
--- Validates a variable
-function validate(value, cast_number, cast_int)
-       if cast_number or cast_int then
-               value = tonumber(value)
-       end
-       
-       if cast_int and value and not(value % 1 == 0) then
-               value = nil
-       end
-       
-       return value
-end
-
-
 -- Parse units from a string and return integer value
 function parse_units(ustr)