add_rule_by_array ($ruleset [, $ignore_keys=array()])
Parameters:
  • $ruleset (array) – An array of rules formatted as per Setting Validation Rules
  • $ignore_keys (array) – An array of keys for $group that should not be passed in to the form_validation object
Returns:

void

Return type:

void

There are times where the validation rules are manually altered and/or have undocumented keys in the ruleset. This method will apply the ruleset for a single input after taking out any undocumented keys (as per $ignore_keys). See Creating Sets of Rules for the correct structure of a ruleset.
N.B. You can provide the "error" key.