Welcome Guest, Not a member yet? Register   Sign In
Unable to access an error message corresponding to your field name.
#1

[eluser]The Casual Bot[/eluser]
Hi

I'm using a call back in form_validation

but keep getting the following error

Code:
Unable to access an error message corresponding to your field name.

the callback is to check if the date entered is before now or after now

the validation works a treat but the error is displayed

iv searched the forum and found some people with the same problem but no of there solutions work

so i tried some testing

The rule
Code:
'trim|required|callback__check_date'

the function

Code:
function _check_date($str)
    {
      $this->form_validation->set_message('_check_date', 'callback date error val failed ');
           return FALSE;
        }


so now the validation fails no mater what but i still ge the error my view works fine and displays every other message
#2

[eluser]The Casual Bot[/eluser]
hey i have got this working but its not the way it should

iv added

Code:
$lang['_check_date']         = "date failed validation ";

to the form_validation_lang.php file
#3

[eluser]sophistry[/eluser]
could this thread about form_validation rule errors help you?

http://ellislab.com/forums/viewthread/124483/




Theme © iAndrew 2016 - Forum software by © MyBB