Assert an error the form shows, wherever the page writes it: its validation summary (a message the app gives for the form rather than one field: "Username 'user@example.com' is already taken.", "Incorrect password."), its error status message ("Error: ..." in a Blazor Web App), or the message next to one of its fields ("Verification code is invalid." is a field's on the default account pages and the page's in a Blazor Web App).
Examples
Then the form should show the error "Username 'user@example.com' is already taken."
Then the form should show the error "Incorrect password."
And the form should show the error "Passwords must have at least one digit ('0'-'9')."
Then the form should show the error "Invalid login attempt."
And the form should show the error "Verification code is invalid."
Pattern
Then(/^the form should show the error "([^"]*)"$/, …)
Part of @webship-js/aspnet-core-steps (github.com/webship/aspnet-core-steps), a step pack for Webship-js 2.0.x.