Then the "Telephone" field should have the error "Telephone must be a 10-digit number"

Assert that a field shows, or does not show, an error message (the message of a refused value, next to the field). The field is found by its label as the page writes it, or by its name attribute.

Examples

Then the "Telephone" field should have the error "Telephone must be a 10-digit number"
Then the "First Name" field should have the error "must not be blank"
And the "Name" field should have the error "is already in use"
Then the "Birth Date" field should have the error "invalid date"
Then the "First Name" field should not have the error "must not be blank"

Pattern

Then(/^the "([^"]*)" field should( not)* have the error "([^"]*)"$/, …)

Part of @webship-js/spring-boot-steps (github.com/webship/spring-boot-steps), a step pack for Webship-js 2.0.x.