Then 2 fields should be shown as invalid

How many fields of the page are shown as invalid (aria-invalid or data-invalid), counting the visible ones.

Examples

Then 2 fields should be shown as invalid
And no fields should be shown as invalid
Then 1 field should be shown as invalid
And 3 fields should be shown as invalid
Then no field should be shown as invalid

Pattern

Then(/^(\d+|no) fields? should be shown as invalid$/, …)

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