From 4b2f33f3c6d109365090b08244d7f99ad4e69025 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 9 Sep 2016 22:16:51 +0200 Subject: Client: reactive forms --- client/src/app/shared/form-validators/index.ts | 1 - client/src/app/shared/form-validators/url.validator.ts | 11 ----------- 2 files changed, 12 deletions(-) delete mode 100644 client/src/app/shared/form-validators/index.ts delete mode 100644 client/src/app/shared/form-validators/url.validator.ts (limited to 'client/src/app/shared/form-validators') 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 @@ -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 @@ -import { FormControl } from '@angular/forms'; - -export function validateUrl(c: FormControl) { - let URL_REGEXP = new RegExp('^https?://(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$'); - - return URL_REGEXP.test(c.value) ? null : { - validateUrl: { - valid: false - } - }; -} -- cgit v1.2.3