2020-01-07 08:56:07 -05:00
|
|
|
import validator from 'validator'
|
2019-04-11 08:26:41 -04:00
|
|
|
import { CONSTRAINTS_FIELDS } from '../../initializers/constants'
|
2017-12-22 04:50:07 -05:00
|
|
|
|
|
|
|
const VIDEO_COMMENTS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.VIDEO_COMMENTS
|
|
|
|
|
|
|
|
function isValidVideoCommentText (value: string) {
|
|
|
|
return value === null || validator.isLength(value, VIDEO_COMMENTS_CONSTRAINTS_FIELDS.TEXT)
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
export {
|
2021-06-03 11:33:44 -04:00
|
|
|
isValidVideoCommentText
|
2017-12-22 04:50:07 -05:00
|
|
|
}
|