+function isVideoViewsValid (value) {
+ return validator.isInt(value + '', VIDEOS_CONSTRAINTS_FIELDS.VIEWS)
+}
+
+function isVideoLikesValid (value) {
+ return validator.isInt(value + '', VIDEOS_CONSTRAINTS_FIELDS.LIKES)
+}
+
+function isVideoDislikesValid (value) {
+ return validator.isInt(value + '', VIDEOS_CONSTRAINTS_FIELDS.DISLIKES)
+}
+
+function isVideoEventCountValid (value) {
+ return validator.isInt(value + '', VIDEO_EVENTS_CONSTRAINTS_FIELDS.COUNT)
+}
+
+function isVideoRatingTypeValid (value) {
+ return values(constants.VIDEO_RATE_TYPES).indexOf(value) !== -1
+}
+
+function isVideoFile (value, files) {
+ // Should have files
+ if (!files) return false
+
+ // Should have videofile file
+ const videofile = files.videofile
+ if (!videofile || videofile.length === 0) return false
+
+ // The file should exist
+ const file = videofile[0]
+ if (!file || !file.originalname) return false
+
+ return new RegExp('^video/(webm|mp4|ogg)$', 'i').test(file.mimetype)
+}
+