- body('displayName').optional().custom(isUserDisplayNameValid).withMessage('Should have a valid display name'),
- body('description').optional().custom(isUserDescriptionValid).withMessage('Should have a valid description'),
- body('password').optional().custom(isUserPasswordValid).withMessage('Should have a valid password'),
- body('email').optional().isEmail().withMessage('Should have a valid email attribute'),
- body('nsfwPolicy').optional().custom(isUserNSFWPolicyValid).withMessage('Should have a valid display Not Safe For Work policy'),
- body('autoPlayVideo').optional().custom(isUserAutoPlayVideoValid).withMessage('Should have a valid automatically plays video attribute'),
+ body('displayName')
+ .optional()
+ .custom(isUserDisplayNameValid).withMessage('Should have a valid display name'),
+ body('description')
+ .optional()
+ .custom(isUserDescriptionValid).withMessage('Should have a valid description'),
+ body('currentPassword')
+ .optional()
+ .custom(isUserPasswordValid).withMessage('Should have a valid current password'),
+ body('password')
+ .optional()
+ .custom(isUserPasswordValid).withMessage('Should have a valid password'),
+ body('email')
+ .optional()
+ .isEmail().withMessage('Should have a valid email attribute'),
+ body('nsfwPolicy')
+ .optional()
+ .custom(isUserNSFWPolicyValid).withMessage('Should have a valid display Not Safe For Work policy'),
+ body('autoPlayVideo')
+ .optional()
+ .custom(isUserAutoPlayVideoValid).withMessage('Should have a valid automatically plays video attribute'),
+ body('videoLanguages')
+ .optional()
+ .custom(isUserVideoLanguages).withMessage('Should have a valid video languages attribute'),
+ body('videosHistoryEnabled')
+ .optional()
+ .custom(isUserVideosHistoryEnabledValid).withMessage('Should have a valid videos history enabled attribute'),
+ body('theme')
+ .optional()
+ .custom(v => isThemeNameValid(v) && isThemeRegistered(v)).withMessage('Should have a valid theme'),
+ body('noInstanceConfigWarningModal')
+ .optional()
+ .custom(v => isNoInstanceConfigWarningModal(v)).withMessage('Should have a valid noInstanceConfigWarningModal boolean'),
+ body('noWelcomeModal')
+ .optional()
+ .custom(v => isNoWelcomeModal(v)).withMessage('Should have a valid noWelcomeModal boolean'),
+ body('autoPlayNextVideo')
+ .optional()
+ .custom(v => isUserAutoPlayNextVideoValid(v)).withMessage('Should have a valid autoPlayNextVideo boolean'),