jquery - HTML required validation retriggers on form submit -


i have form 4 inputs, of have required attribute. form reset on submit

'submit form': function(event){     ...     $("#addorupdateform").trigger("reset"); } 

this seemingly works encountered unusual behaviour in use case:

  • the submit button clicked without entering values
  • as result validation triggered , doesn't allow submission
  • values entered , form submitted
  • immediately after submission, validation triggered , fields highlighted in red

why validation triggering after submission, without attempting submit blank values?


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -