Closed jay-edx closed 3 years ago
Hello, I'm passing body in form-data as I need to pass a file as well (file is optional). If I don't pass the file and when i apply the middle ware for validating the body using celebrate, It's not working.
Here is my code:
VOTER_CREATE: celebrate({ body: Joi.object({ firstName: Joi.string().required() }) })
You're going to need to show more than that. I don't have enough code to get an idea of what you're doing or what might be wrong.
Closing due to inactivity.
Hello, I'm passing body in form-data as I need to pass a file as well (file is optional). If I don't pass the file and when i apply the middle ware for validating the body using celebrate, It's not working.
Here is my code: