Mystifies me. There is certainly nothing in that code that should be preventing the submit.
Can you give us a live URL to look at?
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.