baseUrl regex
This commit is contained in:
parent
78ffdd538a
commit
7f71c5f3d0
|
@ -60,8 +60,10 @@
|
||||||
<mat-form-field appearance="fill" floatLabel="always" style="width: 100%;">
|
<mat-form-field appearance="fill" floatLabel="always" style="width: 100%;">
|
||||||
<mat-label>Base URL</mat-label>
|
<mat-label>Base URL</mat-label>
|
||||||
<input matInput formControlName="baseurl" />
|
<input matInput formControlName="baseurl" />
|
||||||
<mat-error *ngIf="addApiForm.get('baseurl')?.invalid">This field is
|
<mat-error *ngIf="addApiForm.get('baseurl')?.invalid">
|
||||||
<strong>required</strong></mat-error>
|
Invalid URL
|
||||||
|
<span *ngIf="addApiForm.get('baseurl')?.hasError('required')">: This field is <strong>required</strong></span>
|
||||||
|
</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<ng-container *ngFor="let p of selProtParams">
|
<ng-container *ngFor="let p of selProtParams">
|
||||||
|
|
|
@ -179,7 +179,7 @@ export class DsmAddApiDialog {
|
||||||
compatibility : new FormControl('', [Validators.required]),
|
compatibility : new FormControl('', [Validators.required]),
|
||||||
contentdescription : new FormControl('', [Validators.required]),
|
contentdescription : new FormControl('', [Validators.required]),
|
||||||
protocol : new FormControl('', [Validators.required]),
|
protocol : new FormControl('', [Validators.required]),
|
||||||
baseurl : new FormControl('', [Validators.required]),
|
baseurl : new FormControl('', [Validators.required, Validators.pattern('^(http|https|ftp|file|sftp|jar|mongodb):\/\/')]),
|
||||||
metadataIdentifierPath : new FormControl('', [Validators.required])
|
metadataIdentifierPath : new FormControl('', [Validators.required])
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue