I am using jquery validation plugin for validation empty forms. Should I also check this in PHP to be sure on 100%? Or it is ok with javascript validation.
Thanks
I am using jquery validation plugin for validation empty forms. Should I also check
Share
You should always do your validation on the server.
What happens if a user submits the form in some way not using Javascript? Then all of the JS validation is null and void. Never trust Javascript alone. It’s a very nice tool to use to make the site look slick, etc, but you can’t assume the user will use it, even if you set it up that you aren’t letting them submit normally.
When I personally put client and server side validation up, I work them to be the exact same validations. That way, the user typically doesn’t see the server validation, but if something goes wrong, the information is still validated a much as necessary.