set_rules() set_rules( $field, $label = '', $rules = '') : void Set Rules This function takes an array of field names and validation rules as input, validates the info, and stores it Parameters $field $label $rules
set_message() set_message( $lang, $val = '') : string 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. Parameters $lang $val Returns string
set_error_delimiters() set_error_delimiters( $prefix = '<p>', $suffix = '</p>') : void Set The Error Delimiter Permits a prefix/suffix to be added to each error message Parameters $prefix $suffix
error() error( $field = '', $prefix = '', $suffix = '') : void Get Error Message Gets the error message associated with a particular field Parameters $field $prefix $suffix
error_string() error_string( $prefix = '', $suffix = '') : \str Error String Returns the error messages as a string, wrapped in the error delimiters Parameters $prefix $suffix Returns \str
run() run( $group = '') : boolean Run the Validator This function does all the work. Parameters $group Returns boolean
set_value() set_value( $field = '', $default = '') : void Get the value from a form Permits you to repopulate a form field with the value it was submitted with, or, if that value doesn't exist, with the default Parameters $field $default
set_select() set_select( $field = '', $value = '', $default = FALSE) : string Set Select Enables pull-down lists to be set to the value the user selected in the event of an error Parameters $field $value $default Returns string
set_radio() set_radio( $field = '', $value = '', $default = FALSE) : string Set Radio Enables radio buttons to be set to the value the user selected in the event of an error Parameters $field $value $default Returns string
set_checkbox() set_checkbox( $field = '', $value = '', $default = FALSE) : string Set Checkbox Enables checkboxes to be set to the value the user selected in the event of an error Parameters $field $value $default Returns string
regex_match() regex_match( $str, $regex) : boolean Performs a Regular Expression match test. Parameters $str $regex Returns boolean
matches() matches( $str, $field) : boolean Match one field to another Parameters $str $field Returns boolean
is_unique() is_unique( $str, $field) : boolean Match one field to another Parameters $str $field Returns boolean
valid_ip() valid_ip( $ip, $which = '') : string Validate IP Address Parameters $ip $which Returns string
alpha_dash() alpha_dash( $str) : boolean Alpha-numeric with underscores and dashes Parameters $str Returns boolean
greater_than() greater_than( $str, $min) : boolean Greather than Parameters $str $min Returns boolean
is_natural() is_natural( $str) : boolean Is a Natural number (0,1,2,3, etc.) Parameters $str Returns boolean
is_natural_no_zero() is_natural_no_zero( $str) : boolean Is a Natural number, but not a zero (1,2,3, etc.) Parameters $str Returns boolean
valid_base64() 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 Parameters $str Returns boolean
prep_for_form() prep_for_form( $data = '') : string Prep data for form This function allows HTML to be safely shown in a form. Special characters are converted. Parameters $data Returns string
encode_php_tags() encode_php_tags( $str) : string Convert PHP tags to entities Parameters $str Returns string
_reduce_array() _reduce_array( $array, $keys, $i) : mixed Traverse a multidimensional $_POST array index until the data is found Parameters $array $keys $i Returns mixed
_reset_post_array() _reset_post_array() : null Re-populate the _POST array with our finalized and processed data Returns null
_execute() _execute( $row, $rules, $postdata = NULL, $cycles) : mixed Executes the Validation routines Parameters $row $rules $postdata $cycles Returns mixed
_translate_fieldname() _translate_fieldname( $fieldname) : string Translate a field name Parameters $fieldname Returns string