withViewErrors([$key => ['Something is wrong here.']])->blade($blade); expect($html) ->toContain('Something is wrong here.') ->toContain('aria-invalid="true"'); })->with([ 'input' => ['', 'email'], 'password' => ['', 'password'], 'textarea' => ['', 'message'], 'select' => ['', 'hours'], 'checkbox' => ['', 'terms'], 'radio' => ['', 'audience'], 'file with brackets' => ['', 'photos'], 'nested name' => ['', 'address.city'], 'timepicker' => ['', 'starts_at'], ]); it('keeps reading the wire:model name when both are there', function () { expect((string) $this->withViewErrors(['form.email' => ['Taken.']])->blade('')) ->toContain('Taken.'); });