What is the most appropriate response code to return when using the PUT method to update a resource, and the request contains some data that would invalidate the domain rules?
For example, a customer resource must have a name specified. If an agent tries to issue a PUT without supplying a name I don’t want to update the resource, and I want to tell the caller that they need to supply a name.
What HTTP response code?
The response code is not related to the http method in this case. You should return the same status code as if it had been a POST request. I’d say you should use
400or409(Note: See further discussion of the difference between the two in the comments).