summaryrefslogtreecommitdiffstats
path: root/system/libraries/Form_validation.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries/Form_validation.php')
-rw-r--r--system/libraries/Form_validation.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index bbd0b523e..7b9215c04 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -1230,6 +1230,21 @@ 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