diff options
Diffstat (limited to 'system/libraries/Validation.php')
-rw-r--r-- | system/libraries/Validation.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/system/libraries/Validation.php b/system/libraries/Validation.php index 153657e31..b65b9be52 100644 --- a/system/libraries/Validation.php +++ b/system/libraries/Validation.php @@ -519,13 +519,27 @@ class CI_Validation { * Numeric * * @access public - * @param string + * @param int * @return bool */ function numeric($str) { return ( ! ereg("^[0-9\.]+$", $str)) ? FALSE : TRUE; } + + // -------------------------------------------------------------------- + + /** + * Is Numeric + * + * @access public + * @param string + * @return bool + */ + function is_numeric($str) + { + return ( ! is_numeric($str)) ? FALSE : TRUE; + } // -------------------------------------------------------------------- |