diff options
Diffstat (limited to 'system/libraries/Form_validation.php')
-rw-r--r-- | system/libraries/Form_validation.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index bbd0b523e..1511d9add 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -1232,6 +1232,19 @@ class CI_Form_validation { // -------------------------------------------------------------------- /** + * Alpha-numeric w/ spaces + * + * @param string + * @return bool + */ + public function alpha_numeric_spaces($str) + { + return (bool) preg_match('/^[A-Z0-9 ]+$/i', $str); + } + + // -------------------------------------------------------------------- + + /** * Alpha-numeric with underscores and dashes * * @param string |