X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fcustom-validators%2Fvideos.js;h=8dabb828d0d51941b626671d17fac7c6e126e405;hb=3092476e64d09b449b4ad4f5198024afec1b22ca;hp=d0b08e7aca120ad89fb8e666482bd8f697c8a0f7;hpb=023553a2bde74c5765b5ea679fc04128c27f18a0;p=github%2FChocobozzz%2FPeerTube.git 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 = { isVideoDateValid, isVideoCategoryValid, isVideoLicenceValid, + isVideoLanguageValid, isVideoNSFWValid, isVideoDescriptionValid, isVideoDurationValid, @@ -51,6 +52,10 @@ function isVideoLicenceValid (value) { return constants.VIDEO_LICENCES[value] !== undefined } +function isVideoLanguageValid (value) { + return constants.VIDEO_LANGUAGES[value] !== undefined +} + function isVideoNSFWValid (value) { return validator.isBoolean(value) }