From 6a56d50cc03ec74a905718e711b48253cc267f00 Mon Sep 17 00:00:00 2001 From: Kevin Wood-Friend Date: Tue, 12 Jun 2012 09:54:01 -0400 Subject: Modified Form Validation class's set_rules() so it can now handle an array of rules, instead of just a string --- system/libraries/Form_validation.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'system/libraries/Form_validation.php') diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 77c968e7c..6cbe032c7 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -187,6 +187,12 @@ class CI_Form_validation { return $this; } + // Convert an array of rules to a string + if (is_array($rules)) + { + $rules = implode('|', $rules); + } + // No fields? Nothing to do... if ( ! is_string($field) OR ! is_string($rules) OR $field === '') { -- cgit v1.2.3-24-g4f1b