[ACS-8640] - unable to create tag with certain special characters (#10139)

* [ACS-8640] [ACC] Unable to create tag with certain special characters

* [ACS-8640] [ACC] Unable to create tag with certain special characters
This commit is contained in:
dominikiwanekhyland
2024-08-29 16:57:36 +02:00
committed by GitHub
parent 706428d356
commit 158baa7cc9
2 changed files with 2 additions and 2 deletions

View File

@@ -376,7 +376,7 @@ describe('TagsCreatorComponent', () => {
})); }));
it('should show error for prohibited characters', fakeAsync(() => { it('should show error for prohibited characters', fakeAsync(() => {
typeTag('tag*"<>\\/?:|{}()^'); typeTag('tag*"<>\\/?:|{}()^.');
component.tagNameControl.markAsTouched(); component.tagNameControl.markAsTouched();
fixture.detectChanges(); fixture.detectChanges();
const error = getFirstError(); const error = getFirstError();

View File

@@ -374,7 +374,7 @@ export class TagsCreatorComponent implements OnInit, OnDestroy {
} }
private validateSpecialCharacters(tagNameControl: FormControl<string>): TagNameControlErrors | null { private validateSpecialCharacters(tagNameControl: FormControl<string>): TagNameControlErrors | null {
const specialSymbolsRegex = /[{}()^':"\\|<>/?]/; const specialSymbolsRegex = /[{}()^':"\\|<>/?.*]/;
return tagNameControl.value.length && specialSymbolsRegex.test(tagNameControl.value) ? { specialCharacters: true } : null; return tagNameControl.value.length && specialSymbolsRegex.test(tagNameControl.value) ? { specialCharacters: true } : null;
} }