diff options
Diffstat (limited to 'server/helpers/custom-validators/videos.js')
-rw-r--r-- | server/helpers/custom-validators/videos.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/helpers/custom-validators/videos.js b/server/helpers/custom-validators/videos.js index 8495e9665..d0b08e7ac 100644 --- a/server/helpers/custom-validators/videos.js +++ b/server/helpers/custom-validators/videos.js | |||
@@ -15,6 +15,7 @@ const videosValidators = { | |||
15 | isVideoDateValid, | 15 | isVideoDateValid, |
16 | isVideoCategoryValid, | 16 | isVideoCategoryValid, |
17 | isVideoLicenceValid, | 17 | isVideoLicenceValid, |
18 | isVideoNSFWValid, | ||
18 | isVideoDescriptionValid, | 19 | isVideoDescriptionValid, |
19 | isVideoDurationValid, | 20 | isVideoDurationValid, |
20 | isVideoInfoHashValid, | 21 | isVideoInfoHashValid, |
@@ -50,6 +51,10 @@ function isVideoLicenceValid (value) { | |||
50 | return constants.VIDEO_LICENCES[value] !== undefined | 51 | return constants.VIDEO_LICENCES[value] !== undefined |
51 | } | 52 | } |
52 | 53 | ||
54 | function isVideoNSFWValid (value) { | ||
55 | return validator.isBoolean(value) | ||
56 | } | ||
57 | |||
53 | function isVideoDescriptionValid (value) { | 58 | function isVideoDescriptionValid (value) { |
54 | return validator.isLength(value, VIDEOS_CONSTRAINTS_FIELDS.DESCRIPTION) | 59 | return validator.isLength(value, VIDEOS_CONSTRAINTS_FIELDS.DESCRIPTION) |
55 | } | 60 | } |