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

  • @bruhgoaway4876
    @bruhgoaway4876 Жыл бұрын

    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.

  • @ead5590
    @ead5590 Жыл бұрын

    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! ✌🏻

  • @ddbros6603
    @ddbros66032 жыл бұрын

    it just amazing and also your explanation is excellent Thank You!

  • @renatomignogna6895
    @renatomignogna68953 жыл бұрын

    Hey Pedro, thanks for this - great tutorial!

  • @paulinha-19
    @paulinha-19 Жыл бұрын

    Amazing, thanks for video!

  • @faris.abuali
    @faris.abuali2 жыл бұрын

    Thanks Pedro! 😀 I see that 'yup' is similar to 'express-validator' package

  • @mohamedyoussef8835
    @mohamedyoussef88352 жыл бұрын

    Awesome Tutorial.... Thank you +++++++++++

  • @PandaPiper
    @PandaPiper2 жыл бұрын

    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?

  • @shin9850
    @shin98502 жыл бұрын

    thaks man, it help me a lot

  • @wangsunhakhun4314
    @wangsunhakhun4314 Жыл бұрын

    really helpful.. save so much pain..

  • @otaviopontes6637
    @otaviopontes66373 жыл бұрын

    Boa Pedro, ajudou pakas 👍

  • @PedroTechnologies

    @PedroTechnologies

    3 жыл бұрын

    Fico feliz! Obrigado!

  • @danielyabu
    @danielyabu Жыл бұрын

    Thanks man, it helped a lot! BTW, your English is great. I just heard you pronouncing 'buddy' instead of 'body'... LOL

  • @PedroTechnologies

    @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!

  • @Shellflower1234
    @Shellflower12343 жыл бұрын

    Amazing!!

  • @PedroTechnologies

    @PedroTechnologies

    3 жыл бұрын

    Thanks!!

  • @medAmineRg
    @medAmineRg2 жыл бұрын

    great video

  • @Mercio2
    @Mercio22 жыл бұрын

    Thanks!

  • @jean-louisgouwy
    @jean-louisgouwy3 жыл бұрын

    What it could be cool would be to send all the errors directly in the formatted error response :)

  • @n1ght_walker536

    @n1ght_walker536

    3 жыл бұрын

    This is exactly what brought me here. Sighs, disappointed I must say.

  • @ohyeah3514

    @ohyeah3514

    2 жыл бұрын

    how to do that

  • @majidshah48

    @majidshah48

    Жыл бұрын

    set "abortEarly" to false example:: await schema.validate({ name: 'jimmy', age: 24 } , { abortEarly : false});

  • @fri9268
    @fri92683 жыл бұрын

    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

    @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?

  • @nicolajslvsten4978
    @nicolajslvsten49783 жыл бұрын

    how to display server response on the client using html?

  • @maxmaksum4673
    @maxmaksum46733 жыл бұрын

    great

  • @PedroTechnologies

    @PedroTechnologies

    3 жыл бұрын

    Thank you!

  • @medAmineRg
    @medAmineRg2 жыл бұрын

    hey you dont need to return next() that will cause a serious problem. you have just to call it. otherwise great tutoriel!

  • @medAmineRg

    @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

  • @usmanmughal5916
    @usmanmughal59163 жыл бұрын

    Firebase project

  • @PedroTechnologies

    @PedroTechnologies

    3 жыл бұрын

    Firebase is awesome! I am planning on a video talking about login with firebase!

  • @usmanmughal5916

    @usmanmughal5916

    3 жыл бұрын

    @@PedroTechnologies yea with storage for pics

  • @usmanmughal5916

    @usmanmughal5916

    3 жыл бұрын

    @@PedroTechnologies can i know what is ur age? Iam 18

  • @PedroTechnologies

    @PedroTechnologies

    3 жыл бұрын

    Yeah, should definitely do one!

  • @PedroTechnologies

    @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

Келесі