You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
main
${ noResults }
15 lines
453 B
TypeScript
15 lines
453 B
TypeScript
import validator from 'validator'
|
|||
import { CONSTRAINTS_FIELDS } from '../../initializers/constants.js'
|
|||
|
|||
const VIDEO_COMMENTS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.VIDEO_COMMENTS
|
|||
|
|||
function isValidVideoCommentText (value: string) {
|
|||
return value === null || validator.default.isLength(value, VIDEO_COMMENTS_CONSTRAINTS_FIELDS.TEXT)
|
|||
}
|
|||
|
|||
// ---------------------------------------------------------------------------
|
|||
|
|||
export {
|
|||
isValidVideoCommentText
|
|||
}
|