How do I retain the default HTML form validation and yet prohibit form submitting? I have tried using event.preventDefault()
and return false
. Both are successful in stopping the form from submitting but both fail in form validation. I have also tried this solution, but even that does not work.
Is anybody able to help me?