mardi 3 février 2015

Should I respond with a 400 error if a form submit contains validation errors?

In a classic form-based webapp, if a user submits a HTML form that contains validation errors, assuming no JavaScript, what's the correct thing to do?



  1. Respond with the HTTP 200 + the page content (including error info for the user)

  2. Respond with the HTTP 400 + the page content (including error info for the user)


Does it matter?





Aucun commentaire:

Enregistrer un commentaire