• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
not the typical validation question.

#1
[eluser]jdfwarrior[/eluser]
This will sound odd, but is an actual html form required to use the form validation? I do a lot of my data submission via ajax via jquery, which only requires me to know the field id. Therefore I don't always use an actual form, I just throw an input field in where I need it and go. Info would be submitted to a CI controller as normal. I could easily make my own validation function if I needed to, but was just wondering if this would still work.

Any ideas?

#2
[eluser]TheFuzzy0ne[/eluser]
The validation library has been designed to work directly on the $_POST array. No form, no $_POST array. That is, of course, unless you post using Ajax.

EDIT: I meant to say, "Yes, you can validate your Ajax requests using the form validation library, just as long as you submit the data using the POST method".

#3
[eluser]jdfwarrior[/eluser]
Nice, this what I'm doing. Posting to the controller via ajax.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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