Skip to content

Commit

Permalink
fix: change condition to validate type field in request body schema
Browse files Browse the repository at this point in the history
  • Loading branch information
pankajjs committed Jan 3, 2025
1 parent 5365ff5 commit 4250e0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middlewares/validators/updateRequestValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const updateOnboardingExtensionRequestValidator = async (req: Request, res: Cust
'number.positive': 'newEndsOn must be positive',
'number.greater': 'newEndsOn must be greater than current date',
}),
type: joi.string().valid([REQUEST_TYPE.ONBOARDING]).required().messages({
type: joi.string().equal(REQUEST_TYPE.ONBOARDING).required().messages({
"type.any": "type is required",
})
});
Expand Down

0 comments on commit 4250e0a

Please sign in to comment.