diff options
author | Mike Funk <mfunk@xulonpress.com> | 2012-03-08 15:01:40 +0100 |
---|---|---|
committer | Mike Funk <mfunk@xulonpress.com> | 2012-03-08 15:01:40 +0100 |
commit | 98626f1b4b3002c64364d82080246b91aa5e4bd2 (patch) | |
tree | 5216da502b1d077570832417f4253cd45e55da70 /system/libraries/Form_validation.php | |
parent | 7f42d060fb828bfb0bd857ad1a17b91070e52628 (diff) | |
parent | 5d27c43d29fc049497010ea62ac7877a64bfed92 (diff) |
Merge branch 'develop' of https://github.com/EllisLab/CodeIgniter into feature/form_val_config
Diffstat (limited to 'system/libraries/Form_validation.php')
-rw-r--r-- | system/libraries/Form_validation.php | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 3e16d69ed..7e8cac6b0 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -77,7 +77,7 @@ class CI_Form_validation { mb_internal_encoding($this->CI->config->item('charset')); } - log_message('debug', "Form Validation Class Initialized"); + log_message('debug', 'Form Validation Class Initialized'); } // -------------------------------------------------------------------- @@ -96,7 +96,7 @@ class CI_Form_validation { { // No reason to set rules if we have no POST data // or a validation array has not been specified - if (count($_POST) === 0 && count($this->validation_data) === 0) + if ($this->CI->input->method() !== 'post' && empty($this->validation_data)) { return $this; } @@ -177,9 +177,9 @@ class CI_Form_validation { * * If an array is set through this method, then this array will * be used instead of the $_POST array - * - * Note that if you are validating multiple arrays, then the - * reset_validation() function should be called after validating + * + * Note that if you are validating multiple arrays, then the + * reset_validation() function should be called after validating * each array due to the limitations of CI's singleton * * @param array $data @@ -1168,15 +1168,14 @@ class CI_Form_validation { } // -------------------------------------------------------------------- - + /** * Equal to or Greater than * - * @access public * @param string * @return bool */ - function greater_than_equal_to($str, $min) + public function greater_than_equal_to($str, $min) { if ( ! is_numeric($str)) { @@ -1207,11 +1206,10 @@ class CI_Form_validation { /** * Equal to or Less than * - * @access public * @param string * @return bool */ - function less_than_equal_to($str, $max) + public function less_than_equal_to($str, $max) { if ( ! is_numeric($str)) { @@ -1363,7 +1361,7 @@ class CI_Form_validation { * Prevents subsequent validation routines from being affected by the * results of any previous validation routine due to the CI singleton. * - * @return void + * @return void */ public function reset_validation() { |