diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-05-16 19:51:07 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-05-16 19:51:07 +0200 |
commit | a996fc4abef3a02a7299a92dbcbdd6425b160af7 (patch) | |
tree | 13476e40a580ec39d818d87b53feb1d2dfba1a27 /server/helpers/customValidators.js | |
parent | 67100f1f971dd10a466a321899b56c0813e08d31 (diff) | |
download | PeerTube-a996fc4abef3a02a7299a92dbcbdd6425b160af7.tar.gz PeerTube-a996fc4abef3a02a7299a92dbcbdd6425b160af7.tar.zst PeerTube-a996fc4abef3a02a7299a92dbcbdd6425b160af7.zip |
Add check for the author username length
Diffstat (limited to 'server/helpers/customValidators.js')
-rw-r--r-- | server/helpers/customValidators.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/server/helpers/customValidators.js b/server/helpers/customValidators.js index 9b982369e..b95e2b9bb 100644 --- a/server/helpers/customValidators.js +++ b/server/helpers/customValidators.js | |||
@@ -19,6 +19,7 @@ function eachIsRemoteVideosAddValid (values) { | |||
19 | !isNaN(val.duration) && | 19 | !isNaN(val.duration) && |
20 | val.duration >= 0 && | 20 | val.duration >= 0 && |
21 | val.duration < constants.MAXIMUM_VIDEO_DURATION && | 21 | val.duration < constants.MAXIMUM_VIDEO_DURATION && |
22 | validator.isLength(val.author, 1, constants.MAXIMUM_AUTHOR_LENGTH) && | ||
22 | validator.isDate(val.createdDate) | 23 | validator.isDate(val.createdDate) |
23 | }) | 24 | }) |
24 | } | 25 | } |