From c2abf1fdac7252a9145108db6d30ed5c31fac6ec Mon Sep 17 00:00:00 2001 From: Rick Ellis Date: Wed, 20 Aug 2008 22:18:48 +0000 Subject: --- system/libraries/Validation.php | 60 ++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'system') diff --git a/system/libraries/Validation.php b/system/libraries/Validation.php index a0423c7b6..c828328b6 100644 --- a/system/libraries/Validation.php +++ b/system/libraries/Validation.php @@ -589,17 +589,17 @@ class CI_Validation { // -------------------------------------------------------------------- - /** - * Is Numeric - * - * @access public - * @param string - * @return bool - */ - function is_numeric($str) - { - return ( ! is_numeric($str)) ? FALSE : TRUE; - } + /** + * Is Numeric + * + * @access public + * @param string + * @return bool + */ + function is_numeric($str) + { + return ( ! is_numeric($str)) ? FALSE : TRUE; + } // -------------------------------------------------------------------- @@ -617,31 +617,31 @@ class CI_Validation { // -------------------------------------------------------------------- - /** - * Is a Natural number (0,1,2,3, etc.) - * - * @access public - * @param string - * @return bool - */ - function is_natural($str) - { + /** + * Is a Natural number (0,1,2,3, etc.) + * + * @access public + * @param string + * @return bool + */ + function is_natural($str) + { return (bool)preg_match( '/^[0-9]+$/', $str); - } + } // -------------------------------------------------------------------- - /** - * Is a Natural number, but not a zero (1,2,3, etc.) - * - * @access public - * @param string - * @return bool - */ + /** + * Is a Natural number, but not a zero (1,2,3, etc.) + * + * @access public + * @param string + * @return bool + */ function is_natural_no_zero($str) - { + { return (bool)preg_match( '/^[1-9]+$/', $str); - } + } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b