Suppose I have a form and I want the user not to submit the form before validation, so I use event.preventDefault () in onsubmit:
// In my validation.js $('#myForm').bind('submit', function(event){ event.preventDefault(); // I do the client-side validation here });
You can see here, the user can edit the validaiton code after the preventDefault () line. And they are tested (client side only)
What is a safer way to do an “ajax” form with client side validation? I also have server side validation, but I just want to ask, how to make the client side harder to crack and more secure?
source share