One way to stop form submission is to return false from your JavaScript function.
When the submit button is clicked, a validation function is called. I have a case i
Base on @Vikram Pudi answer, we can also do like this with pure Javascript