SyntaxFix
Write A Post
Hire A Developer
Questions
The simplest solution is just to not call e.preventDefault() unless validation actually fails. Move that line inside the inner if statement, and remove the last line of the function with the .unbind().submit().
e.preventDefault()
if
.unbind().submit()