Skip to content

Commit

Permalink
Made suspend reason be required.
Browse files Browse the repository at this point in the history
  • Loading branch information
SupertigerDev committed Jul 29, 2023
1 parent 6186a18 commit 35a8fb3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/routes/moderation/userBatchSuspend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ export function userBatchSuspend(Router: Router) {
.isLength({ min: 0, max: 5 })
.withMessage('Days must be less than 99999'),
body('reason')
.optional()
.not()
.isEmpty()
.withMessage('Reason is required.')
.isString()
.withMessage('Reason must be a string.')
.isLength({ min: 0, max: 500 })
Expand Down

0 comments on commit 35a8fb3

Please sign in to comment.