]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/helpers/custom-validators/video-comments.ts
Allow accounts to skip account setup modal
[github/Chocobozzz/PeerTube.git] / server / helpers / custom-validators / video-comments.ts
CommitLineData
7cde3b9c 1import validator from 'validator'
74dc3bca 2import { CONSTRAINTS_FIELDS } from '../../initializers/constants'
bf1f6508
C
3
4const VIDEO_COMMENTS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.VIDEO_COMMENTS
5
6function isValidVideoCommentText (value: string) {
7 return value === null || validator.isLength(value, VIDEO_COMMENTS_CONSTRAINTS_FIELDS.TEXT)
8}
9
10// ---------------------------------------------------------------------------
11
12export {
10363c74 13 isValidVideoCommentText
bf1f6508 14}