]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/customValidators.js
Add createdDate to videos
[github/Chocobozzz/PeerTube.git] / server / helpers / customValidators.js
index a5ae32780c09b126075fe8452e6f00716b1e992d..a8fc6942d6868555e6d5419f841c890c593960ce 100644 (file)
@@ -13,7 +13,9 @@ function eachIsRemoteVideosAddValid (values) {
     return validator.isLength(val.name, 1, 50) &&
       validator.isLength(val.description, 1, 50) &&
       validator.isLength(val.magnetUri, 10) &&
-      validator.isURL(val.podUrl)
+      validator.isURL(val.podUrl) &&
+      !isNaN(val.duration) &&
+      validator.isDate(val.createdDate)
   })
 }