sujaltangde / JobLane

JobLane - Full Stack Job application portal built using MERN Stack
https://joblane.vercel.app/
55 stars 50 forks source link

💡 Schema Validation on Post request : #194

Open Devendraxp opened 1 week ago

Devendraxp commented 1 week ago

I'm always frustrated when there is no validation on the incoming post request data, which can lead to inconsistent data being stored in the database and potential errors during runtime.

Solution : I would like to implement schema validation using the Joi library to ensure that incoming post request data is validated against a predefined schema before proceeding further. This will help maintain data integrity and reduce runtime errors.

Alternatives considered include using other validation libraries such as Yup or custom validation middleware. However, Joi is well-documented, widely used, and integrates seamlessly with Express.

Additional context Implementing Joi will involve creating validation schemas for each route that handles post requests and integrating these validations into the request handling process. Here is the Joi documentation for reference.

@sujaltangde I want to work on this feature, please assign it to me.

github-actions[bot] commented 1 week ago

Thank you for creating this issue! 🎉 We'll look into it as soon as possible. In the meantime, please make sure to provide all the necessary details and context. If you have any questions or additional information, feel free to add them here. Your contributions are highly appreciated! 😊

You can also check our CONTRIBUTING.md for guidelines on contributing to this project.