diff options
Diffstat (limited to 'client/src/app/shared/form-validators')
-rw-r--r-- | client/src/app/shared/form-validators/index.ts | 1 | ||||
-rw-r--r-- | client/src/app/shared/form-validators/url.validator.ts | 11 |
2 files changed, 0 insertions, 12 deletions
diff --git a/client/src/app/shared/form-validators/index.ts b/client/src/app/shared/form-validators/index.ts deleted file mode 100644 index f9e9a6191..000000000 --- a/client/src/app/shared/form-validators/index.ts +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | export * from './url.validator'; | ||
diff --git a/client/src/app/shared/form-validators/url.validator.ts b/client/src/app/shared/form-validators/url.validator.ts deleted file mode 100644 index 67163b4e9..000000000 --- a/client/src/app/shared/form-validators/url.validator.ts +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | import { FormControl } from '@angular/forms'; | ||
2 | |||
3 | export function validateUrl(c: FormControl) { | ||
4 | let URL_REGEXP = new RegExp('^https?://(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$'); | ||
5 | |||
6 | return URL_REGEXP.test(c.value) ? null : { | ||
7 | validateUrl: { | ||
8 | valid: false | ||
9 | } | ||
10 | }; | ||
11 | } | ||