Welcome Guest, Not a member yet? Register   Sign In
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.




Theme © iAndrew 2016 - Forum software by © MyBB