mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 22:33:35 +00:00
PM-25991 changed validation from pattern to min length (#16496)
This commit is contained in:
@@ -121,9 +121,9 @@ describe("ConnectDialogHecComponent", () => {
|
|||||||
expect(component.formGroup.valid).toBeTruthy();
|
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({
|
component.formGroup.setValue({
|
||||||
url: "ftp://test.com",
|
url: "test",
|
||||||
bearerToken: "token",
|
bearerToken: "token",
|
||||||
index: "1",
|
index: "1",
|
||||||
service: "Test Service",
|
service: "Test Service",
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export class ConnectHecDialogComponent implements OnInit {
|
|||||||
hecConfig: HecConfiguration | null = null;
|
hecConfig: HecConfiguration | null = null;
|
||||||
hecTemplate: HecTemplate | null = null;
|
hecTemplate: HecTemplate | null = null;
|
||||||
formGroup = this.formBuilder.group({
|
formGroup = this.formBuilder.group({
|
||||||
url: ["", [Validators.required, Validators.pattern("https?://.+")]],
|
url: ["", [Validators.required, Validators.minLength(7)]],
|
||||||
bearerToken: ["", Validators.required],
|
bearerToken: ["", Validators.required],
|
||||||
index: ["", Validators.required],
|
index: ["", Validators.required],
|
||||||
service: ["", Validators.required],
|
service: ["", Validators.required],
|
||||||
|
|||||||
Reference in New Issue
Block a user