summaryrefslogtreecommitdiffstats
path: root/system/libraries/Form_validation.php
diff options
context:
space:
mode:
authorLance Vincent <lancevincent@gmail.com>2015-01-27 18:36:10 +0100
committerLance Vincent <lancevincent@gmail.com>2015-01-27 18:36:10 +0100
commitfd5b2acabda081e3dccc2e50997b4dcfac2caf88 (patch)
tree5f0cefea2c9fad0d9ca30d99a7181ad19131ba01 /system/libraries/Form_validation.php
parente700c31255ca2cf1a6c38bdf0db962cc48304e55 (diff)
Form Validation - Not In Method
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