![]() |
Form Validation - Error Message for Anonoymous Function - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Form Validation - Error Message for Anonoymous Function (/showthread.php?tid=71583) |
Form Validation - Error Message for Anonoymous Function - deltatangodt - 08-31-2018 How do I set an error message for an anonymous function used to validate a field when using the form validation class? Code: PHP Code: $this->form_validation->set_rules('referral-code', 'Referral Code', RE: Form Validation - Error Message for Anonoymous Function - jreklund - 09-01-2018 You need to wrap it in another array and specify a message string name as the first parameter. PHP Code: $this->form_validation->set_rules( |