summaryrefslogtreecommitdiffstats
path: root/system/libraries/Form_validation.php
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2011-07-02 00:54:49 +0200
committerDerek Jones <derek.jones@ellislab.com>2011-07-02 00:54:49 +0200
commit8f371a4954ec84f9ea80c26e654a4793714f8a07 (patch)
tree912d83e6e2adbe136d892f0a41ea1730dc11206a /system/libraries/Form_validation.php
parent806b82448ddccece1311228519dc1410dacd0971 (diff)
parent4b9c62980599228f070b401c7673dce8085b0c61 (diff)
hand merged remaining unresolved files following the backout of 648b42a75739, which was a NON-trivial whitespace commit
Diffstat (limited to 'system/libraries/Form_validation.php')
-rw-r--r--system/libraries/Form_validation.php32
1 files changed, 16 insertions, 16 deletions
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index d8bcbd62b..6f79a554a 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -102,7 +102,7 @@ class CI_Form_validation {
}
// No fields? Nothing to do...
- if ( ! is_string($field) OR ! is_string($rules) OR $field == '')
+ if ( ! is_string($field) OR ! is_string($rules) OR $field == '')
{
return $this;
}
@@ -110,8 +110,8 @@ class CI_Form_validation {
// If the field label wasn't passed we use the field name
$label = ($label == '') ? $field : $label;
- // Is the field name an array? We test for the existence of a bracket "[" in
- // the field name to determine this. If it is an array, we break it apart
+ // Is the field name an array? We test for the existence of a bracket "[" in
+ // the field name to determine this. If it is an array, we break it apart
// into its components so that we can fetch the corresponding POST data later
if (strpos($field, '[') !== FALSE AND preg_match_all('/\[(.*?)\]/', $field, $matches))
{
@@ -155,8 +155,8 @@ class CI_Form_validation {
/**
* Set Error Message
*
- * Lets users set their own error messages on the fly. Note: The key
- * name has to match the function name that it corresponds to.
+ * Lets users set their own error messages on the fly. Note: The key
+ * name has to match the function name that it corresponds to.
*
* @access public
* @param string
@@ -281,7 +281,7 @@ class CI_Form_validation {
*/
function run($group = '')
{
- // Do we even have any data to process? Mm?
+ // Do we even have any data to process? Mm?
if (count($_POST) == 0)
{
return FALSE;
@@ -291,7 +291,7 @@ class CI_Form_validation {
// If not, we look to see if they were assigned via a config file
if (count($this->_field_data) == 0)
{
- // No validation rules? We're done...
+ // No validation rules? We're done...
if (count($this->_config_rules) == 0)
{
return FALSE;
@@ -648,7 +648,7 @@ class CI_Form_validation {
}
}
- // Did the rule test negatively? If so, grab the error.
+ // Did the rule test negatively? If so, grab the error.
if ($result === FALSE)
{
if ( ! isset($this->_error_messages[$rule]))
@@ -664,7 +664,7 @@ class CI_Form_validation {
}
// Is the parameter we are inserting into the error message the name
- // of another field? If so we need to grab its "field label"
+ // of another field? If so we need to grab its "field label"
if (isset($this->_field_data[$param]) AND isset($this->_field_data[$param]['label']))
{
$param = $this->_translate_fieldname($this->_field_data[$param]['label']);
@@ -704,7 +704,7 @@ class CI_Form_validation {
// Grab the variable
$line = substr($fieldname, 5);
- // Were we able to translate the field name? If not we use $line
+ // Were we able to translate the field name? If not we use $line
if (FALSE === ($fieldname = $this->CI->lang->line($line)))
{
return $line;
@@ -735,7 +735,7 @@ class CI_Form_validation {
}
// If the data is an array output them one at a time.
- // E.g: form_input('name[]', set_value('name[]');
+ // E.g: form_input('name[]', set_value('name[]');
if (is_array($this->_field_data[$field]['postdata']))
{
return array_shift($this->_field_data[$field]['postdata']);
@@ -914,7 +914,7 @@ class CI_Form_validation {
return FALSE;
}
- return TRUE;
+ return TRUE;
}
// --------------------------------------------------------------------
@@ -1207,7 +1207,7 @@ class CI_Form_validation {
// --------------------------------------------------------------------
/**
- * Is a Natural number (0,1,2,3, etc.)
+ * Is a Natural number (0,1,2,3, etc.)
*
* @access public
* @param string
@@ -1221,7 +1221,7 @@ class CI_Form_validation {
// --------------------------------------------------------------------
/**
- * Is a Natural number, but not a zero (1,2,3, etc.)
+ * Is a Natural number, but not a zero (1,2,3, etc.)
*
* @access public
* @param string
@@ -1354,7 +1354,7 @@ class CI_Form_validation {
*/
function encode_php_tags($str)
{
- return str_replace(array('<?php', '<?PHP', '<?', '?>'), array('&lt;?php', '&lt;?PHP', '&lt;?', '?&gt;'), $str);
+ return str_replace(array('<?php', '<?PHP', '<?', '?>'), array('&lt;?php', '&lt;?PHP', '&lt;?', '?&gt;'), $str);
}
}