CI_Form_validation::set_rules()

set_rules($field[, $label = ''[, $rules = '']])

Parameters:
  • $field (string) – Field name
  • $label (string) – Field label
  • $rules (mixed) – Validation rules, as a string list separated by a pipe “|”, or as an array or rules
Returns:

CI_Form_validation instance (method chaining)

Return type:

CI_Form_validation

Permits you to set validation rules, as described in the tutorial sections above:

  • Setting Validation Rules
  • Saving Sets of Validation Rules to a Config File
doc_CodeIgniter
2016-10-15 16:31:34
Comments
Leave a Comment

Please login to continue.