1 import { Injectable } from '@angular/core'
2 import { Validators } from '@angular/forms'
3 import { BuildFormValidator } from './form-validator.service'
6 export class AbuseValidatorsService {
7 readonly ABUSE_REASON: BuildFormValidator
8 readonly ABUSE_MODERATION_COMMENT: BuildFormValidator
9 readonly ABUSE_MESSAGE: BuildFormValidator
13 VALIDATORS: [ Validators.required, Validators.minLength(2), Validators.maxLength(3000) ],
15 'required': $localize`Report reason is required.`,
16 'minlength': $localize`Report reason must be at least 2 characters long.`,
17 'maxlength': $localize`Report reason cannot be more than 3000 characters long.`
21 this.ABUSE_MODERATION_COMMENT = {
22 VALIDATORS: [ Validators.required, Validators.minLength(2), Validators.maxLength(3000) ],
24 'required': $localize`Moderation comment is required.`,
25 'minlength': $localize`Moderation comment must be at least 2 characters long.`,
26 'maxlength': $localize`Moderation comment cannot be more than 3000 characters long.`
30 this.ABUSE_MESSAGE = {
31 VALIDATORS: [ Validators.required, Validators.minLength(2), Validators.maxLength(3000) ],
33 'required': $localize`Abuse message is required.`,
34 'minlength': $localize`Abuse message must be at least 2 characters long.`,
35 'maxlength': $localize`Abuse message cannot be more than 3000 characters long.`