Skip to content
Advertisement

Unable to access an error message corresponding to your field name

I have a callback function that check_captcha which sees if $row is ==0 or == 1 (this information is queried from sql).

The problem is that I can not call it from $self->form_validation->set_rule('captcha', 'call_back_check_captcha') due to the fact that my function takes in a $row var. The way I’m calling it now I get a Unable to access error message. How can I make this work?

JavaScript

Advertisement

Answer

JavaScript

The message name corresponds to the function, not the field. So setting it to “check_captcha” will fix your bug. The error message will use the correct field name.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement