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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
3 additions and
0 deletions
-
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}; |
|
|
|
}; |
|
|
|
|
|
|
|
|