php - Style CodeIgniter "human name" in form validation -


i want apply custom general style "human names" in codeigniter set_rules method of form validation class:

$this->form_validation->set_rules(<name of field>, <human name>, <rules>); 

say want make "human names" in boldface, know can do:

$this->form_validation->set_rules(<name of field>, <strong>human name</strong>, <rules>); 

however difficult manage once number of fields style gets larger.

is there way access using set_error_delimeters?

$this->form_validation->set_error_delimeters('<div class="error">', '</div>'); 

wherein can set delimeters "human name" or 2nd parameter in set_rules method?

currently there no (at least explicitly discussed) way documentation.

you can change set_rules functions of form_validation library.you need change label parameter of function. set_rules function in library. change line $label = ($label === '') ? $field : $label;

surround $field , $label after ? delimeters.

you can override or modify core library function or create new function in validation library set delimeters human names.


Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -