Skip to content

Instantly share code, notes, and snippets.

@narfbg
Created July 2, 2012 12:41
Show Gist options
  • Save narfbg/3033063 to your computer and use it in GitHub Desktop.
Save narfbg/3033063 to your computer and use it in GitHub Desktop.
CodeIgniter Form validation library, empty rules
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 3536241..70421ce 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -459,6 +459,10 @@ class CI_Form_validation {
{
$this->_field_data[$field]['postdata'] = $validation_array[$field];
}
+ elseif ( ! empty($row['rules']))
+ {
+ continue;
+ }
$this->_execute($row, explode('|', $row['rules']), $this->_field_data[$field]['postdata']);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment