feedback tab
This commit is contained in:
@@ -310,6 +310,22 @@ const validateVerifyResetToken = [
|
||||
handleValidationErrors,
|
||||
];
|
||||
|
||||
// Feedback validation
|
||||
const validateFeedback = [
|
||||
body("feedbackText")
|
||||
.trim()
|
||||
.isLength({ min: 5, max: 5000 })
|
||||
.withMessage("Feedback must be between 5 and 5000 characters"),
|
||||
|
||||
body("url")
|
||||
.optional()
|
||||
.trim()
|
||||
.isLength({ max: 500 })
|
||||
.withMessage("URL must be less than 500 characters"),
|
||||
|
||||
handleValidationErrors,
|
||||
];
|
||||
|
||||
module.exports = {
|
||||
sanitizeInput,
|
||||
handleValidationErrors,
|
||||
@@ -321,4 +337,5 @@ module.exports = {
|
||||
validateForgotPassword,
|
||||
validateResetPassword,
|
||||
validateVerifyResetToken,
|
||||
validateFeedback,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user