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:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user