1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

PM-25991 changed validation from pattern to min length (#16496)

This commit is contained in:
Vijay Oommen
2025-09-19 09:16:57 -05:00
committed by GitHub
parent 19b6b1f528
commit 012ff03bef
2 changed files with 3 additions and 3 deletions

View File

@@ -121,9 +121,9 @@ describe("ConnectDialogHecComponent", () => {
expect(component.formGroup.valid).toBeTruthy();
});
it("should invalidate url if not matching pattern", () => {
it("should test url is at least 7 characters long", () => {
component.formGroup.setValue({
url: "ftp://test.com",
url: "test",
bearerToken: "token",
index: "1",
service: "Test Service",

View File

@@ -37,7 +37,7 @@ export class ConnectHecDialogComponent implements OnInit {
hecConfig: HecConfiguration | null = null;
hecTemplate: HecTemplate | null = null;
formGroup = this.formBuilder.group({
url: ["", [Validators.required, Validators.pattern("https?://.+")]],
url: ["", [Validators.required, Validators.minLength(7)]],
bearerToken: ["", Validators.required],
index: ["", Validators.required],
service: ["", Validators.required],