Request Validation in .NET / C# Minimal APIs

Поделиться
HTML-код
  • Опубликовано: 13 янв 2025

Комментарии • 18

  • @forgeteverythingelse
    @forgeteverythingelse 17 дней назад

    your videos are definitely more useful than long&empty chapsas videos. thanks

  • @СергейИванченков-ДляСвоих

    Fantastic tut, cannot get any better from here. Thank you for your amazing work!

  • @EnriqueMartinezInter
    @EnriqueMartinezInter 14 дней назад

    Amazing stuff, to the point and very useful indeed!

  • @pere5854
    @pere5854 2 месяца назад

    Great video: to the point and full of real life stuff while keeping it simple. Awesome. Subscribed!

  • @farhadsu
    @farhadsu 9 месяцев назад +4

    Thanks for clearly explanation!

  • @michaelakin766
    @michaelakin766 3 месяца назад +1

    Great video. Keep it up.

  • @xtech13
    @xtech13 8 месяцев назад

    Well explained and helpful. Any idea how do i use ruleset with the validationextension.

  • @irvinwaldman4233
    @irvinwaldman4233 5 месяцев назад

    How would you validate query parameters that are int's and strings?

  • @CharlieMarket
    @CharlieMarket 4 месяца назад

    Very good content! Congratulations.
    How can I validate a MapGet with query parameters ? The idea is validate allowed (valid) combinations of five parameters included in the query

  • @muhammadahmod334
    @muhammadahmod334 8 месяцев назад

    What’s the best way to validate a recipients bank account details for different countries? Some have swift codes and others have iban numbers, others have account name and branch code. But they all use create recipient endpoint. Should you split the endpoint? Or use a flag in the validation logic? Or can you pass some kind of schema to the validation method, ie. The request should match a certain schema 100%

  • @Astral100
    @Astral100 9 месяцев назад +4

    On one hand its a very neat implementation, but on the other there is a bit too much auto-wiring magic for my liking. Not sure I would go with this approach.

    • @jonowilliams26
      @jonowilliams26  9 месяцев назад +5

      Can you explain how its "too much auto wiring magic" when you have to explicitly add WithRequestValidation to the endpoints?
      Or are you talking about the auto registration of the validators using builder.Services.AddValidatorsInAssembly()? If it is this one, this is a very common thing that .NET projects do, register things by convention. If you are using Controllers, .NET has a builder.Services.AddControllers() method which will do the exact same thing, register all controllers to the DI container etc.

  • @YouHarle
    @YouHarle 9 месяцев назад +4

    Just recently found your channel, i like your short, concise but informative videos, so here, have a subscribe

    • @jonowilliams26
      @jonowilliams26  9 месяцев назад +1

      Thank you! Glad you like the videos