title: Which http status codes to use when processing http post?
body: <p>I have a HTML form, which I submit via http post.</p>
  <p>There are two cases:</p>
  <ul>
  <li>Case 1: The data is valid and data on the server will be updated accordingly</li>
  <li>Case 2: The data is invalid and the http response contains an error message for the user.</li>
  </ul>
  <p>Which http status codes should be used for each case?</p>
  <p>I use <a href="//htmx.org" rel="nofollow noreferrer">htmx</a> to submit the form. This means I don't need to use the POST/Redirect/GET pattern.</p>
  <p>This question is not about JSON-APIs.</p>