diff options
Diffstat (limited to 'client/src/app/shared')
-rw-r--r-- | client/src/app/shared/forms/form-validators/index.ts | 1 | ||||
-rw-r--r-- | client/src/app/shared/forms/form-validators/video-report.ts | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/client/src/app/shared/forms/form-validators/index.ts b/client/src/app/shared/forms/form-validators/index.ts index 4c6cc6637..119b5d9bf 100644 --- a/client/src/app/shared/forms/form-validators/index.ts +++ b/client/src/app/shared/forms/form-validators/index.ts | |||
@@ -1,3 +1,4 @@ | |||
1 | export * from './host.validator'; | 1 | export * from './host.validator'; |
2 | export * from './user'; | 2 | export * from './user'; |
3 | export * from './video-report'; | ||
3 | export * from './video'; | 4 | export * from './video'; |
diff --git a/client/src/app/shared/forms/form-validators/video-report.ts b/client/src/app/shared/forms/form-validators/video-report.ts new file mode 100644 index 000000000..036ee1721 --- /dev/null +++ b/client/src/app/shared/forms/form-validators/video-report.ts | |||
@@ -0,0 +1,10 @@ | |||
1 | import { Validators } from '@angular/forms'; | ||
2 | |||
3 | export const VIDEO_REPORT_REASON = { | ||
4 | VALIDATORS: [ Validators.required, Validators.minLength(2), Validators.maxLength(300) ], | ||
5 | MESSAGES: { | ||
6 | 'required': 'Report reason name is required.', | ||
7 | 'minlength': 'Report reson must be at least 2 characters long.', | ||
8 | 'maxlength': 'Report reson cannot be more than 300 characters long.' | ||
9 | } | ||
10 | }; | ||