]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - server/helpers/custom-validators/video-comments.ts
Disable openapi generation
[github/Chocobozzz/PeerTube.git] / server / helpers / custom-validators / video-comments.ts
1 import validator from 'validator'
2 import { CONSTRAINTS_FIELDS } from '../../initializers/constants'
3
4 const VIDEO_COMMENTS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.VIDEO_COMMENTS
5
6 function isValidVideoCommentText (value: string) {
7 return value === null || validator.isLength(value, VIDEO_COMMENTS_CONSTRAINTS_FIELDS.TEXT)
8 }
9
10 // ---------------------------------------------------------------------------
11
12 export {
13 isValidVideoCommentText
14 }