modifications to numeric and integer validation
diff --git a/system/libraries/Validation.php b/system/libraries/Validation.php
index dc4e016..a3ce980 100644
--- a/system/libraries/Validation.php
+++ b/system/libraries/Validation.php
@@ -552,7 +552,8 @@
*/
function numeric($str)
{
- return ( ! is_numeric($str)) ? FALSE : TRUE;
+ return (bool)preg_match( '/^[\-+]?[0-9]*\.?[0-9]+$/', $str);
+
}
// --------------------------------------------------------------------
@@ -566,7 +567,7 @@
*/
function integer($str)
{
- return ( ! is_int($str)) ? FALSE : TRUE;
+ return (bool)preg_match( '/^[\-+]?[0-9]+$/', $str);
}
// --------------------------------------------------------------------