Fixes: https://tracker.ceph.com/issues/68198
Signed-off-by: Dnyaneshwari Talwekar <dtalweka@redhat.com>
<span *ngIf="snapshotForm.showError('snapshotName', formDir, 'required')"
class="invalid-feedback"
i18n>This field is required.</span>
+ <span *ngIf="snapshotForm.showError('snapshotName', formDir, 'pattern')"
+ class="invalid-feedback"
+ i18n>The snapshot name cannot start with "." and cannot contain "/" and "@".</span>
</ng-template>
</div>
createForm() {
this.snapshotForm = new CdFormGroup({
snapshotName: new UntypedFormControl('', {
- validators: [Validators.required]
+ validators: [Validators.required, Validators.pattern(/^(?!\.)[^/@]+$/)]
}),
mirrorImageSnapshot: new UntypedFormControl(false, {})
});