If it is a server validation then I would suggest to just return a regular HTML element with the error message. No need to use a 400 response.
--
You received this message because you are subscribed to the Google Groups "intercooler-js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to intercooler-j...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I would even make the case that 200 is the correct response code in this case, conceptually speaking.
The HTTP status codes are primarily about protocol-level issues. 4xx means that the protocol request is malformed somehow. That could include, say, an unrecognized form parameter or URL path. But if the browser correctly gathered input from the user and correctly passed it along to the server, and the server processed the request without crashing (correctly identifying problems in the user's input), then 200 is the right code even though it's an "error" being returned, because it's a user-level error, not a protocol-level error.
Cheers,
Justin