Express JS #10 - Validation

Поділитися
Вставка
  • Опубліковано 20 гру 2024

КОМЕНТАРІ • 21

  • @DariusD0815
    @DariusD0815 20 днів тому

    Great video. Maybe its worth mentioning that there is also a "bail" option that breaks the validation chain when a rule check fails. So that it is not necessary to check the length when a field is empty or not a string.

  • @mirzakhursheedabbas4184
    @mirzakhursheedabbas4184 2 місяці тому

    Simply saying in this section u rocked❤ .your content is >>>>>>> than my paid courses huge respect from india.Than q so much sir for providing this kind of lectures😍

  • @ramiworkstation
    @ramiworkstation 7 місяців тому +6

    I subscribed because you are nice and I liked you. I enjoy learning from you. Thank you 🌻

  • @QQmatt-c5i
    @QQmatt-c5i 4 місяці тому +1

    I am wondering which auto formatter do you use. It's so great.

  • @chagantisubhash
    @chagantisubhash 5 місяців тому

    Great video!! Please add more.

  • @mahendranath2504
    @mahendranath2504 10 місяців тому +2

    Nice thank you so much

  • @laiiyabro1055
    @laiiyabro1055 9 місяців тому +1

    bro how to validate the contact number and any int number (is a number between 0 - 5 like this)

    • @ansonthedev
      @ansonthedev  9 місяців тому +1

      You can use a regular expression to validate a phone number to ensure it matches a specific pattern. To validate numeric values you can just check if its within range by checking if it's greater than 0 or less than 5.

  • @WhyNot-fp6cv
    @WhyNot-fp6cv 3 місяці тому

    How if incoming from client = JSON.stringify ?
    Because in server side need to JSON.parse before.

    • @ansonthedev
      @ansonthedev  3 місяці тому +1

      If you pass nested objects they will not parse correctly on the server. So the server needs to handle the JSON in a string format.

  • @pavankumar-of4ew
    @pavankumar-of4ew 6 місяців тому

    i am still getting the error in video17:32

  • @PSKI1
    @PSKI1 5 місяців тому

    Matur suwun bro

  • @ibrahimhassoun2595
    @ibrahimhassoun2595 3 місяці тому

    Thank you!

  • @tomassabol59
    @tomassabol59 10 місяців тому

    how is this better compared to libs like zod or arktype?

    • @ansonthedev
      @ansonthedev  10 місяців тому +4

      I don't think the purpose of this video is to say it is better than other libraries, the point is to show the importance of validation. You can use whatever library you want to achieve it, but my goal is to show when to do it and how. If you don't like express-validator you can use something else, all you need to do is just make sure the library you use is validating the data before you use it.

  • @anishbishnoi29xD
    @anishbishnoi29xD 8 місяців тому

    Please make video zod with express js. 😊

  • @WhyNot-fp6cv
    @WhyNot-fp6cv 3 місяці тому

    U tutorial title with tutor title before and before, code stack so confused!.
    Why not created clean code every tutorial title.

  • @GabrielYasso-og7zc
    @GabrielYasso-og7zc 3 дні тому

    flowless explanation. thanks a lot.