aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/custom-validators')
-rw-r--r--server/helpers/custom-validators/remote/videos.js1
-rw-r--r--server/helpers/custom-validators/videos.js5
2 files changed, 6 insertions, 0 deletions
diff --git a/server/helpers/custom-validators/remote/videos.js b/server/helpers/custom-validators/remote/videos.js
index df8f8a22e..24715b4b3 100644
--- a/server/helpers/custom-validators/remote/videos.js
+++ b/server/helpers/custom-validators/remote/videos.js
@@ -87,6 +87,7 @@ function isCommonVideoAttributesValid (video) {
87 videosValidators.isVideoDateValid(video.updatedAt) && 87 videosValidators.isVideoDateValid(video.updatedAt) &&
88 videosValidators.isVideoCategoryValid(video.category) && 88 videosValidators.isVideoCategoryValid(video.category) &&
89 videosValidators.isVideoLicenceValid(video.licence) && 89 videosValidators.isVideoLicenceValid(video.licence) &&
90 videosValidators.isVideoLanguageValid(video.language) &&
90 videosValidators.isVideoNSFWValid(video.nsfw) && 91 videosValidators.isVideoNSFWValid(video.nsfw) &&
91 videosValidators.isVideoDescriptionValid(video.description) && 92 videosValidators.isVideoDescriptionValid(video.description) &&
92 videosValidators.isVideoDurationValid(video.duration) && 93 videosValidators.isVideoDurationValid(video.duration) &&
diff --git a/server/helpers/custom-validators/videos.js b/server/helpers/custom-validators/videos.js
index d0b08e7ac..8dabb828d 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 isVideoLanguageValid,
18 isVideoNSFWValid, 19 isVideoNSFWValid,
19 isVideoDescriptionValid, 20 isVideoDescriptionValid,
20 isVideoDurationValid, 21 isVideoDurationValid,
@@ -51,6 +52,10 @@ function isVideoLicenceValid (value) {
51 return constants.VIDEO_LICENCES[value] !== undefined 52 return constants.VIDEO_LICENCES[value] !== undefined
52} 53}
53 54
55function isVideoLanguageValid (value) {
56 return constants.VIDEO_LANGUAGES[value] !== undefined
57}
58
54function isVideoNSFWValid (value) { 59function isVideoNSFWValid (value) {
55 return validator.isBoolean(value) 60 return validator.isBoolean(value)
56} 61}