X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2FcustomValidators.js;h=a8fc6942d6868555e6d5419f841c890c593960ce;hb=bb10240ee15d31a1cc17c0e3d748dde817e7d0cb;hp=a5ae32780c09b126075fe8452e6f00716b1e992d;hpb=f0f5567b6918fc60c8cab15e13aec03a89a91dfb;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/helpers/customValidators.js b/server/helpers/customValidators.js index a5ae32780..a8fc6942d 100644 --- a/server/helpers/customValidators.js +++ b/server/helpers/customValidators.js @@ -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) }) }