• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Protype ajax validation problem

#11
[eluser]mdowns[/eluser]
Maybe adding a check on false...Running out of ideas Smile

Code:
$text = trim($this->obj->input->post('value'));
if(empty($text) || $text == FALSE)
{
    echo 'This field is required.';
}

#12
[eluser]Michael;[/eluser]
Nope, that didn't work either.

#13
[eluser]mdowns[/eluser]
Are you using the CI validation library, then?

Perhaps you can post your other working code and the controller.

#14
[eluser]Michael;[/eluser]
Okay, now that I am done kicking myself, over, and over, and over, and over... This issue has been fixed.

Turns out, if the $this->input->post('value') had no value I was skipping my validation routines entirely. I've been starring at this thing so much I just glossed over that line 1000 times or so in the last 2 days.

Thank you for the help, but that line was off in and ajax controller and I stopped looking at it yesterday.

*sighs*

#15
[eluser]mdowns[/eluser]
Glad you figured it out Smile


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.