Then the form field "email" should show an error

Assert a field of the HubSpot form does (or does not) show a validation error, optionally containing the given text (ul.hs-error-msgs after the field, or an input marked invalid). Submit the form first.

Examples

Then the form field "email" should show an error
And the form field "email" should show an error containing "required"
Then the form field "firstname" should show an error containing "Please complete this required field."
But the form field "message" should not show an error
Then form field "email" should not show an error

Pattern

Then(/^(?:the )?form field "([^"]*)" should( not)* show an error(?: containing "([^"]*)")?$/, …)

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