[eluser]KeyStroke[/eluser]
Hi,
I'm trying to do validation using the validation libray through AJAX. This is the function that my javascript library calls:
Code:
function validate_data()
{
$this->_add_form_init(); // this sets all the form rules and field names
if($this->validation->run() == FALSE)
{
// send back the errors to the page
$this->output->set_output($this->validation->error_string);
}
else
{
// data is valid
return TRUE;
}
}
However, every time my scripts calls this function, I get ALL the errors back, whether my data is actually valid or not.
Am I doing this properly? I'm not sending any data to the function ,so maybe that's the problem.
Your help is appreciated