$validation_data
$validation_data : array
Custom data to validate
Form Validation Class
set_rules(mixed $field, string $label = '', mixed $rules = array(), array $errors = array()) : \CI_Form_validation
Set Rules
This function takes an array of field names and validation rules as input, any custom error messages, validates the info, and stores it
| mixed | $field | |
| string | $label | |
| mixed | $rules | |
| array | $errors |
set_data(array $data) : \CI_Form_validation
By default, form validation uses the $_POST array to validate
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 each array due to the limitations of CI's singleton
| array | $data |
set_message( $lang, $val = '') : \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.
| $lang | ||
| $val |
set_error_delimiters( $prefix = '<p>', $suffix = '</p>') : \CI_Form_validation
Set The Error Delimiter
Permits a prefix/suffix to be added to each error message
| $prefix | ||
| $suffix |
valid_base64( $str) : boolean
Valid Base64
Tests a string for characters outside of the Base64 alphabet as defined by RFC 2045 http://www.faqs.org/rfcs/rfc2045
| $str |
| None found |
| None found |
encode_php_tags( $str) : string
Convert PHP tags to entities
| $str |
| None found |
reset_validation() : \CI_Form_validation
Reset validation vars
Prevents subsequent validation routines from being affected by the results of any previous validation routine due to the CI singleton.
| None found |
_reduce_array( $array, $keys, $i) : mixed
Traverse a multidimensional $_POST array index until the data is found
| $array | ||
| $keys | ||
| $i |
| None found |
_reset_post_array() : void
Re-populate the _POST array with our finalized and processed data
| None found |
_execute( $row, $rules, $postdata = NULL, $cycles) : mixed
Executes the Validation routines
| $row | ||
| $rules | ||
| $postdata | ||
| $cycles |
| None found |
_get_error_message(string $rule, string $field) : string
Get the error message for the rule
| string | $rule | The rule name |
| string | $field | The field name |
| None found |
_translate_fieldname( $fieldname) : string
Translate a field name
| $fieldname |
| None found |
_build_error_msg( $line, $field = '', $param = '') : string
Build an error message using the field and param.
| $line | ||
| $field | ||
| $param |
| None found |