$password, 'password_confirmation' => $password], ['password' => ['required', 'string', 'confirmed', Password::defaults()]], ); expect($validator->passes())->toBe($passes); })->with([ '6 Zeichen' => ['abc123', false], '7 Zeichen' => ['abcd123', false], '8 Zeichen' => ['abcd1234', true], '20 Zeichen' => [str_repeat('x', 20), true], ]); it('nennt in der Fehlermeldung die Mindestlänge', function () { app()->setLocale('de'); $validator = Validator::make( ['password' => 'kurz', 'password_confirmation' => 'kurz'], ['password' => ['required', 'confirmed', Password::defaults()]], ); expect($validator->errors()->first('password'))->toContain('8'); });