From 6a98e67ab74d4579ca32c1136de52b2168497966 Mon Sep 17 00:00:00 2001 From: Alex ORLUC <alex.orluc@maarch.org> Date: Mon, 6 Jul 2020 18:08:56 +0200 Subject: [PATCH] FEAT #13671 TIME 0:15 add regex validator path --- .../app/installer/docservers/docservers.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/frontend/app/installer/docservers/docservers.component.ts b/src/frontend/app/installer/docservers/docservers.component.ts index f563049b6f9..bd8b67b4631 100644 --- a/src/frontend/app/installer/docservers/docservers.component.ts +++ b/src/frontend/app/installer/docservers/docservers.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { FormBuilder, FormGroup, Validators, ValidatorFn } from '@angular/forms'; import { NotificationService } from '../../../service/notification/notification.service'; import { tap } from 'rxjs/internal/operators/tap'; import { LANG } from '../../translate.component'; @@ -23,8 +23,10 @@ export class DocserversComponent implements OnInit { public http: HttpClient, private installerService: InstallerService ) { + const valPath: ValidatorFn[] = [Validators.pattern(/^[^\'\<\>\|\*\:\?]+$/), Validators.required]; + this.stepFormGroup = this._formBuilder.group({ - docserversPath: ['/opt/maarch/docservers/', Validators.required], + docserversPath: ['/opt/maarch/docservers/', valPath], stateStep: ['', Validators.required], }); -- GitLab