feat(employee-invite): Updated validation of email-addresses and changed text for assigned users. (TV-628)

Squashed commit of the following:

commit 06df4b0cf3fd7a006287267d6bd3ce427d2ecdd7
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date:   Wed Sep 22 09:17:24 2021 +0200

    Added new text and updated validation
This commit is contained in:
Erik Tiekstra
2021-09-22 10:46:20 +02:00
parent dfa8205817
commit 84f8737ec4
3 changed files with 22 additions and 13 deletions

View File

@@ -23,7 +23,10 @@ export function EmailValidator(label = 'Fältet'): ValidatorFn {
export function CommaSeparatedEmailValidator(): ValidatorFn {
return (control: AbstractControl): ValidationError => {
if (control && control.value) {
const values: string[] = (control.value as string).toLowerCase().trim().split(',');
const values: string[] = (control.value as string)
.toLowerCase()
.replaceAll(/\n|\t|\r|\s/g, '')
.split(',');
const invalidEmailaddresses = [];
values.forEach(value => {