aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-03-22 21:47:05 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-03-22 21:56:02 +0100
commite54163c2d5cc925eb56ead831f2fecd000222a98 (patch)
tree142d0592d66d90b489f592a867770235315bee0c /server/helpers/custom-validators
parent6e07c3de88791a0b342e0cc319590048117f9c2d (diff)
downloadPeerTube-e54163c2d5cc925eb56ead831f2fecd000222a98.tar.gz
PeerTube-e54163c2d5cc925eb56ead831f2fecd000222a98.tar.zst
PeerTube-e54163c2d5cc925eb56ead831f2fecd000222a98.zip
Relax on tags (accept any characters and not required anymore)
Diffstat (limited to 'server/helpers/custom-validators')
-rw-r--r--server/helpers/custom-validators/videos.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/server/helpers/custom-validators/videos.js b/server/helpers/custom-validators/videos.js
index 92b366717..efa89c427 100644
--- a/server/helpers/custom-validators/videos.js
+++ b/server/helpers/custom-validators/videos.js
@@ -69,8 +69,7 @@ function isVideoTagsValid (tags) {
69 return miscValidators.isArray(tags) && 69 return miscValidators.isArray(tags) &&
70 validator.isInt(tags.length, VIDEOS_CONSTRAINTS_FIELDS.TAGS) && 70 validator.isInt(tags.length, VIDEOS_CONSTRAINTS_FIELDS.TAGS) &&
71 tags.every(function (tag) { 71 tags.every(function (tag) {
72 return validator.isAlphanumeric(tag) && 72 return validator.isLength(tag, VIDEOS_CONSTRAINTS_FIELDS.TAG)
73 validator.isLength(tag, VIDEOS_CONSTRAINTS_FIELDS.TAG)
74 }) 73 })
75} 74}
76 75