User Input Validation with express & JOI | Nodejs full course |

Published: 11 August 2022
on channel: Revildo Code
143
0

User Input Validation with express and JOI | Nodejs full course | Full tutorial for beginners | #revildo_code



Steps to implement API Request Schema with Joi Validation In Node. js and Express.

Initial Setup. ...

Define package.json file. ...

Install dependencies. ...

Create Server and Connect with Database. ...

Creating Connection file. ...

Creating server file. ...

Creating Home Route. ...

Creating controller.





How To Use Joi for Node API Schema Validation

Create validation schema for the request data parameters.

Handle validation errors and give appropriate feedback.

Create a middleware to intercept and validate requests.



Joi can be used for creating schemas (just like we use mongoose for creating NoSQL schemas) and you can use it with plain Javascript objects. It's like a plug n play library and is easy to use. On the other hand, express-validator uses validator. js to validate expressjs routes, and it's mainly built for express.




Roadmap

Create login , register , post joi schemas.

Export all schemas as single
module( validators/index.js )

Create configurable middleware that takes
schema name as parameter and validates
request body( middlewares/Validator.js )

Create auth and post routes.

Create expressjs instance.




Joi JS: Joi - awesome code validation for Node. js and Express - DEV Community





Youtube : http://surl.li/cnfif

Facebook : https://www.facebook.com/ajith.revildo.1

Intragram : https://www.instagram.com/invites/contact/...

Snapchat : https://www.snapchat.com/add/revildo1999?s...

Pepul : https://www.pepul.com/profile/vR4NXymSZEgB

Medium : https://medium.com/@ajithrevildo1999

Greek for seek : https://auth.geeksforgeeks.org/invite/zpug...

Codepen : https://codepen.io/Revildo

GitHub : https://github.com/AjithRevildo

Linked In : https://www.linkedin.com/in/ajith-revildo-...

Apna : https://apna.co/ajith-revildo-o8u2v98

Telegram : https://t.me/Revildo

Whatsapp : https://chat.whatsapp.com/FqUhIfyo6bQ2apNu...




#how_to_run_nodejs #install_nodejs #learn_node.js #node.js_demo #node.js_full_course #node.js_http #node.js_training #nodejs_basics #nodejs_beginners #nodejs_course #nodejs_json_api #nodejs_modules #nodejs_tutorial #what_is_nodejs


On this page of the site you can watch the video online User Input Validation with express & JOI | Nodejs full course | with a duration of hours minute second in good quality, which was uploaded by the user Revildo Code 11 August 2022, share the link with friends and acquaintances, this video has already been watched 143 times on youtube and it was liked by 0 viewers. Enjoy your viewing!