codeigniter custom checkbox validation message problem

i don’t know if this is a bug or not, but i couldn’t use my custom error message for a checkbox validation.

i wrote

$this->validation->set_message(“required”, ‘please fill this’);

but it showed the default error message.
i looked throughout my controller and Validation.php, still get confused. it seems like there’s another validation rule called ‘isset’ which is not mentioned in the user guide.

accidentally (or experimentally), i wrote

$this->validation->set_message(“isset”, ‘please fill this’);

and it works!

is it a bug ? or is it common?

any idea?

2 Responses to “codeigniter custom checkbox validation message problem”

  1. mameou Says:

    It’s a bug in Validation class. The author forgot to set the message specified for “required”. I came across this also when I was extending the class for use with VExam.

  2. sajjad hossain Says:

    I think it is a bug. I have tried many times and wasted my time. Thanks for this note. Hope CI team will come with a solution.

Leave a Reply