aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/form-validators/video-comment-validators.ts
blob: c56564d3454297b7b0c880cfeb294f1294478024 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
import { Validators } from '@angular/forms'
import { BuildFormValidator } from './form-validator.model'

export const VIDEO_COMMENT_TEXT_VALIDATOR: BuildFormValidator = {
  VALIDATORS: [ Validators.required, Validators.minLength(1), Validators.maxLength(3000) ],
  MESSAGES: {
    'required': $localize`Comment is required.`,
    'minlength': $localize`Comment must be at least 2 characters long.`,
    'maxlength': $localize`Comment cannot be more than 3000 characters long.`
  }
}