CodeIgniter Forums
Extending Form Validation Library - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Extending Form Validation Library (/showthread.php?tid=57811)



Extending Form Validation Library - El Forum - 04-13-2013

[eluser]ahmadalyan[/eluser]
I'm Working now on Multi-Language website so when i try to use form validation library i had put the validation rules in config file

Code:
$config = array(
           'add_recored' => array(
                                    array(
                                            'field' => 'user_type_name',
                                            'label' => 'lang:err_user_type_name',
                                            'rules' => 'required|min_length[3]|xss_clean'
                                         )
                                    )
               );

know i want to but the error massage in this rule array can any tell me how to implement this

Ie:


Code:
$config = array(
           'add_recored' => array(
                                    array(
                                            'field' => 'user_type_name',
                                            'label' => 'lang:user_type_name',
                                            'rules' => 'required|min_length[3]|xss_clean',
                                            'label' => 'lang:err_user_type_name'
                                         )
                                    )
               );

and when it has an error i want to display this error msg