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.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 3e8204eee..74a5b87a0 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -1475,6 +1475,22 @@ class CI_Form_validation {
// --------------------------------------------------------------------
/**
+ * Value should not be within an array of values
+ *
+ * @param string
+ * @param array
+ * @return bool
+ */
+ public function not_in($value, $list)
+ {
+ $list = array_map('trim', explode(',', (string) $list));
+
+ return ! in_array((string) $value, $list);
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Value should be a valid date
*
* @param string