[eluser]ToddyBoy[/eluser]
Which method of form validation do you use and why?
I can see the pros and cons of both methods. I was wondering which is the more popular method.
[eluser]WanWizard[/eluser]
I guess a mixture is my best guess, altough jquery isn't always involved. Client-side vs Server-side would have been a better choice.
I always validate server-side, no matter what fancy features are build into the form. Client-side validation can sometimes be functional, but I only do it if I can stay client-side. I don't do ajax calls for validation.
[eluser]tomcode[/eluser]
I always validate on server side, client side is convenience, but not trustworthy.
[eluser]dreamer111[/eluser]
ONLY!!! server side. anything client-side can be easily faked.
[eluser]victorche[/eluser]
Of course server side! jQuery fancy stuff can be eye candy, but this is not a real validation...
[eluser]leonardteo[/eluser]
I'd say server side as a baseline, and use JQuery if you want to do some special user experience where it validates on the fly or something.
[eluser]misplacedme[/eluser]
Both.
Validate on the users side so they user is quickly informed if they have wrong/missing information.
Validate on the server side because you can't trust the user not to send you invalid data.