Welcome Guest, Not a member yet? Register   Sign In
Form Validation Error !!
#1

[eluser]Vaibhav132[/eluser]
To validate an url i am using the following callback method
Code:
function validate_url($url){
   $result = @file_get_contents($url);
   if($result == false){
   $this->form_validation->set_message('refurl', 'Enter valid URL');
   return false;
  }
  else{
   return true;
  }
}

If user inserts invalid url ..the following message is thrown

"Unable to access an error message corresponding to your field name."

instead of the one i have set "Enter valid URL".

Is it because i am suppressing file_get_contents function..??




Messages In This Thread
Form Validation Error !! - by El Forum - 01-19-2012, 04:30 AM
Form Validation Error !! - by El Forum - 01-19-2012, 04:45 AM
Form Validation Error !! - by El Forum - 01-19-2012, 05:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB