Browse Source

Merge pull request #14272 from vvlladd28/merge/lts-email

Merge lts-4.2 to rc
pull/14258/head
Vladyslav Prykhodko 7 months ago
committed by GitHub
parent
commit
00bed1ebdc
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 3
      ui-ngx/src/app/core/utils.ts

3
ui-ngx/src/app/core/utils.ts

@ -992,6 +992,9 @@ export const trimDefaultValues = (input: Record<string, any>, defaults: Record<s
}
export const validateEmail = (control: AbstractControl): ValidationErrors | null => {
if (isUndefinedOrNull(control.value) || (typeof control.value === 'string' && control.value.length === 0)) {
return null;
}
return emailRegex.test(control.value) ? null : {email: true};
};

Loading…
Cancel
Save