]>
Commit | Line | Data |
---|---|---|
7cde3b9c | 1 | import validator from 'validator' |
74dc3bca | 2 | import { CONSTRAINTS_FIELDS } from '../../initializers/constants' |
bf1f6508 C |
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 { | |
10363c74 | 13 | isValidVideoCommentText |
bf1f6508 | 14 | } |