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 efa89c427..8495e9665 100644 --- a/server/helpers/custom-validators/videos.js +++ b/server/helpers/custom-validators/videos.js | |||
@@ -14,6 +14,7 @@ const videosValidators = { | |||
14 | isVideoAuthorValid, | 14 | isVideoAuthorValid, |
15 | isVideoDateValid, | 15 | isVideoDateValid, |
16 | isVideoCategoryValid, | 16 | isVideoCategoryValid, |
17 | isVideoLicenceValid, | ||
17 | isVideoDescriptionValid, | 18 | isVideoDescriptionValid, |
18 | isVideoDurationValid, | 19 | isVideoDurationValid, |
19 | isVideoInfoHashValid, | 20 | isVideoInfoHashValid, |
@@ -45,6 +46,10 @@ function isVideoCategoryValid (value) { | |||
45 | return constants.VIDEO_CATEGORIES[value] !== undefined | 46 | return constants.VIDEO_CATEGORIES[value] !== undefined |
46 | } | 47 | } |
47 | 48 | ||
49 | function isVideoLicenceValid (value) { | ||
50 | return constants.VIDEO_LICENCES[value] !== undefined | ||
51 | } | ||
52 | |||
48 | function isVideoDescriptionValid (value) { | 53 | function isVideoDescriptionValid (value) { |
49 | return validator.isLength(value, VIDEOS_CONSTRAINTS_FIELDS.DESCRIPTION) | 54 | return validator.isLength(value, VIDEOS_CONSTRAINTS_FIELDS.DESCRIPTION) |
50 | } | 55 | } |