Backend API Validation Tutorial w/ YUP and ExpressJS
Ғылым және технология
In this video I will teach you guys API validation using YUP and ExpressJS. We are going to create a validation middleware which validates a schema for every endpoint.
-
🚀 Learn ReactJS By Building 6 Projects: codedamn.com/learn/reactjs-pr...
Please leave a comment on what topic you guys want me to cover next!
-
📞 Tutoring Session: www.fiverr.com/share/pw8RPY
💻 PedroTech Discord: / discord
-
Social
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Website: machadopedro.com
Twitter: / pedrotech_
Linkedin: / machadop1407
Instagram: / _pedro.machado_
Github: github.com/machadop1407
Email: machadop1407@gmail.com
Tags:
- YUP Validaiton
- Fetch
- ReactJS Tutorial
- ReactJS and MySQL
- NodeJS Tutorial
- API Tutorial
Пікірлер: 39
Been watching many of your backend/API-related videos recently, and I'm astonished to see how good they hold up in terms of quality and content. Even after completing several projects, I still gain that extra bit of clarity from these videos that help make working on a JS backend more intuitive for me.
This is great! I have implemented YUP on the backend with Prisma along with MySQL. Validation is being done with YUP for the input field values and Prisma checks if the email exists on the DB. That's a whole lot of validation going on.. And I love it! 😆 Thanks a lot Pedro! ✌🏻
it just amazing and also your explanation is excellent Thank You!
Hey Pedro, thanks for this - great tutorial!
Amazing, thanks for video!
Thanks Pedro! 😀 I see that 'yup' is similar to 'express-validator' package
Awesome Tutorial.... Thank you +++++++++++
Pedro: “I’m gonna put something crazy” Pedro: ‘types name’ 😂😂😂 But for real great video! Could you show how to handle the authentication after validating? Or would you just use Firebase like you did in your other video?
thaks man, it help me a lot
really helpful.. save so much pain..
Boa Pedro, ajudou pakas 👍
@PedroTechnologies
3 жыл бұрын
Fico feliz! Obrigado!
Thanks man, it helped a lot! BTW, your English is great. I just heard you pronouncing 'buddy' instead of 'body'... LOL
@PedroTechnologies
Жыл бұрын
Yes hahaha this was a long time ago and my friends made fun of me for how i said it hahaha i say it correctly now!
Amazing!!
@PedroTechnologies
3 жыл бұрын
Thanks!!
great video
Thanks!
What it could be cool would be to send all the errors directly in the formatted error response :)
@n1ght_walker536
3 жыл бұрын
This is exactly what brought me here. Sighs, disappointed I must say.
@ohyeah3514
2 жыл бұрын
how to do that
@majidshah48
Жыл бұрын
set "abortEarly" to false example:: await schema.validate({ name: 'jimmy', age: 24 } , { abortEarly : false});
Hello i watching your videos and they helped me a lot because i am new there and i learn React and everything around it. Now i trying use this validation with mySql on the same way asi you show in CRUD tutorial but i have a BIG problem now, i using this validation with MySQL because when i use middleware with db.querry, server go down with error ERR_HTTP_HEADERS_SENT' and i really do not know what with it and i need it a lot now for my school work. Can you make video how to use yup with mysql query. Thank you very much that you are there.
@PedroTechnologies
3 жыл бұрын
Hey, so yup isn't meant to validate mysql queries in particular. What you validate is the variables you send in the query. So it would be exactly like this, you wouldn't have to touch mysql. If the error continues, could you paste your code here?
how to display server response on the client using html?
great
@PedroTechnologies
3 жыл бұрын
Thank you!
hey you dont need to return next() that will cause a serious problem. you have just to call it. otherwise great tutoriel!
@medAmineRg
2 жыл бұрын
@LALIT BISHT great to hear that my comment help, haha same here it took me like 6 hours to figure that problem, you welcome bro
Firebase project
@PedroTechnologies
3 жыл бұрын
Firebase is awesome! I am planning on a video talking about login with firebase!
@usmanmughal5916
3 жыл бұрын
@@PedroTechnologies yea with storage for pics
@usmanmughal5916
3 жыл бұрын
@@PedroTechnologies can i know what is ur age? Iam 18
@PedroTechnologies
3 жыл бұрын
Yeah, should definitely do one!
@PedroTechnologies
3 жыл бұрын
Damn hahaha Im 19 lmaoo You are a prodigy then, when I was 8 no one in my house had a computer hahaha