aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/custom-validators')
-rw-r--r--server/helpers/custom-validators/videos.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/helpers/custom-validators/videos.ts b/server/helpers/custom-validators/videos.ts
index ae392f8c2..672f06dc0 100644
--- a/server/helpers/custom-validators/videos.ts
+++ b/server/helpers/custom-validators/videos.ts
@@ -118,6 +118,10 @@ function isVideoFileResolutionValid (value: string) {
118 return exists(value) && validator.isInt(value + '') 118 return exists(value) && validator.isInt(value + '')
119} 119}
120 120
121function isVideoFPSResolutionValid (value: string) {
122 return value === null || validator.isInt(value + '')
123}
124
121function isVideoFileSizeValid (value: string) { 125function isVideoFileSizeValid (value: string) {
122 return exists(value) && validator.isInt(value + '', VIDEOS_CONSTRAINTS_FIELDS.FILE_SIZE) 126 return exists(value) && validator.isInt(value + '', VIDEOS_CONSTRAINTS_FIELDS.FILE_SIZE)
123} 127}
@@ -182,6 +186,7 @@ export {
182 isVideoFileInfoHashValid, 186 isVideoFileInfoHashValid,
183 isVideoNameValid, 187 isVideoNameValid,
184 isVideoTagsValid, 188 isVideoTagsValid,
189 isVideoFPSResolutionValid,
185 isScheduleVideoUpdatePrivacyValid, 190 isScheduleVideoUpdatePrivacyValid,
186 isVideoAbuseReasonValid, 191 isVideoAbuseReasonValid,
187 isVideoFile, 192 isVideoFile,