Fix name regex

This commit is contained in:
Marvin Sextro 2021-07-25 12:51:48 +02:00
parent 4eb2dda807
commit 535a4aed14
1 changed files with 3 additions and 3 deletions

View File

@ -73,11 +73,11 @@ export class Payload {
const firstName = nameInformation['gn'];
const lastName = nameInformation['fn'];
const transliteratedFirstName = nameInformation['gnt'];
const transliteratedLastName = nameInformation['fnt'];
const transliteratedFirstName = nameInformation['gnt'].replaceAll('<', ' ');
const transliteratedLastName = nameInformation['fnt'].replaceAll('<', ' ');
// Check if name contains non-latin characters
const nameRegex = new RegExp('^(\\p{Script=Latin}|[ -\'`´])+$', 'u');
const nameRegex = new RegExp('^[\\p{Script=Latin}\\p{P}\\p{M}\\p{Z}]+$', 'u');
let name: string;