]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/custom-validators/videos.js
Server: add video language attribute
[github/Chocobozzz/PeerTube.git] / server / helpers / custom-validators / videos.js
index d0b08e7aca120ad89fb8e666482bd8f697c8a0f7..8dabb828d0d51941b626671d17fac7c6e126e405 100644 (file)
@@ -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)
 }