The API's last answer refused a field: a 422 whose detail has an entry for that field (its loc, without where the value was: "password", "address.city") with a reason containing the text. Letter case and white space do not count.
Examples
Then the API should have refused "password" with "at least 8 characters"
Then the API should have refused "email" with "not a valid email address"
And the API should have refused "title" with "at least 1 character"
Then the API should have refused "skip" with "valid integer"
But the API should have refused "full_name" with "at most 255 characters"
Pattern
Then(/^the API should have refused "([^"]+)" with "([^"]*)"$/, …)
Part of @webship-js/fastapi-steps (github.com/webship/fastapi-steps), a step pack for Webship-js 2.0.x.