Model Validation | Validation Attributes vs. FluentValidation | .NET 6

Model Validation | Validation Attributes vs. FluentValidation | .NET 6

Amichai Mantinband

2 года назад

40,791 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@MilanJovanovicTech
@MilanJovanovicTech - 02.08.2022 15:38

Such a great introduction to the FluentValidation library. I loved that you showed that DI is supported inside of validators. Great job!

Ответить
@joshmeyers2034
@joshmeyers2034 - 02.08.2022 16:34

Love your videos! Every time you say "Yes" whenever the copilot autofill's syntax is really satisfying. Co-pilot is really great

Ответить
@patrykk.4630
@patrykk.4630 - 02.08.2022 16:36

Wow, pretty detailed explanation about this library. Do we use it? Of course 🙂 but more for a simple validations like 'greaterThaZero', 'notEmpty', etc. and several custom validators like '...doesExist'

Ответить
@alexwexov4298
@alexwexov4298 - 02.08.2022 17:47

As always, great !

Ответить
@silvertek
@silvertek - 02.08.2022 17:50

Great pacing and information, keep up the great work. My only complaint is I cant get videos fast enough! :D

Ответить
@ugursesen7629
@ugursesen7629 - 02.08.2022 18:06

excellent tutorial as always, you are awesome

Ответить
@ugursesen7629
@ugursesen7629 - 02.08.2022 18:08

looking forward to your new videos.

Ответить
@musazulu7013
@musazulu7013 - 02.08.2022 18:16

i have to say i love your videos, i always check to see if you have uploaded new content, are you going to build the front-end as well or it's just going to be a service ?
Greate Video by the way!

Ответить
@branislavpetrovic7486
@branislavpetrovic7486 - 02.08.2022 19:06

Great overview of FluentValidation package, I realy like last parts about custom validators.

Thanks!

Ответить
@reynaldorodriguez7161
@reynaldorodriguez7161 - 02.08.2022 19:45

Loving your videos

Ответить
@atifsaeedkhan9207
@atifsaeedkhan9207 - 02.08.2022 23:07

Excellent one

Ответить
@DanielTames
@DanielTames - 03.08.2022 00:27

you are the best .net technology teacher I have ever seen.

Ответить
@evilTano
@evilTano - 03.08.2022 12:44

Hi, great video as always. But I have doubts about the rules for the creation of Breakfast. I'm using a "DDD approach", so Breakfast is an Entity that has a static method "Create()" that works as Factory Method. In your example, you put the "sunrise" rules inside the DateTimeValidators and not inside the "Create()" method of Breakfast class. Is this a good approach? I have to put all the creation rules inside my “BuberBreakfast.Contracts” project and Validators or should I put the creation rules inside the Entity Breakfast?

In short, the creation logic of an entity must be put inside our contracts or inside the Entities?

Thanks!

Ответить
@wvanlosser
@wvanlosser - 03.08.2022 19:20

Thanks for this great introduction into the FluentValidation library.

Ответить
@kamarchand
@kamarchand - 03.08.2022 21:28

Where do you get your Idatetimeprovider from? thanks

Ответить
@56kgofawesome
@56kgofawesome - 04.08.2022 02:04

Great video! Nice structured and explained.
What extension or customization are you using for your terminal? The color state of the branch and path looks gorgeous.

Ответить
@sunefred
@sunefred - 04.08.2022 13:09

Great library and greate demo.

I am a bit dissapointed however that you put the validation in the controller layer and did not keep your structure, with domain and application layers, from previous chapters. If anything, validation is the core of domain functionality.

Ответить
@iliyan-kulishev
@iliyan-kulishev - 04.08.2022 16:42

I've been using FluentValidation for some time now and was stunned by what I saw you doing with this custom validator. Great video, thanks !

Ответить
@ugochukwuumerie6378
@ugochukwuumerie6378 - 04.08.2022 17:19

Such a great content. Keep it up. Yes! :)

Ответить
@danielschmitt5750
@danielschmitt5750 - 04.08.2022 19:03

Hey Amichai :) I have been subscribed to your channel since your first video came out and I though it was about time to leave a comment. I really enjoy watching your videos. They are informative and at the same time fun to watch (at least for someone interested in coding and software archtiecture). At work we already use a lot of the technologies and patterns you introduced in your last videos. Nevertheless, I still learned one or two new things or got a different perspective on things. Thank you for that.

Ответить
@LindenMikus
@LindenMikus - 05.08.2022 22:26

great vid, which software do you use to draw those arrows on screen?

Ответить
@LouisWaweru
@LouisWaweru - 06.08.2022 05:00

Oh, you switched to dark mode. Thank you, from all of us night owls. hoot🦉🌠

Ответить
@AlexRadevichPlus
@AlexRadevichPlus - 08.08.2022 23:47

Will you proceed with the CQRS version of this application? Just want to see FluentValidation + MediatR Behaviors work together.

Ответить
@opachshwee5589
@opachshwee5589 - 10.08.2022 01:12

Bro your channel is small but you are making some of the best .NET 6 content already. Keep up the good work.

Ответить
@dayv2005
@dayv2005 - 11.08.2022 01:11

I misheard. Is it recommended to use manual or automatic validation?

Ответить
@dicusardenis922
@dicusardenis922 - 11.08.2022 08:11

Thanks for the great content, it really inspires me to improve myself to become a better developer. Your are doing great, keep going 👍

Ответить
@fakhrulhilal
@fakhrulhilal - 14.09.2022 05:09

I love your videos, it's very straightforward. Can you share your setup when recording (VScode, screen recorder, etc) in the future?

Ответить
@jimkoro664
@jimkoro664 - 15.09.2022 20:04

Fantastic playlist/work! Thank you! How would you approach fluent validation in a project with application services (without mediatr). Automatic or manual validation -> which means no pipeline behavior, but instead doing the work manually for each action?

Ответить
@bookuha
@bookuha - 22.09.2022 01:08

Thank you!

Ответить
@RakeshChintalacheruvu
@RakeshChintalacheruvu - 22.11.2022 20:31

Excellent!

Ответить
@HueHueHue23
@HueHueHue23 - 06.12.2022 16:34

Hey!
What's the shell and theme you're using in your integrated terminal?

Ответить
@rezarezash
@rezarezash - 17.12.2022 22:23

Should not this be a continuation of BubberDinner?

Ответить
@keyable
@keyable - 19.01.2023 13:12

Nice video! Could you make more detailed video about Attributes and how to use them for validation? Also making Custome Attribute validators?

Ответить
@khaledsaleh286
@khaledsaleh286 - 19.01.2023 14:05

I liked this "Yes" to the copilot autofill :D. I didn't get the idea behind the IAssemblyMarker, can you please elaborate more?

Ответить
@Ran_Gsharim
@Ran_Gsharim - 06.03.2023 08:26

Amichai you are the best! ❤️

Ответить
@kinax2
@kinax2 - 16.03.2023 14:43

Thank for the video but AddFluentValidation is deprecated and is not working with Minimal API.
Please can make a newer video with Minimal API and show us how to validate a request without using [FromServices] IValidator<Request>

Ответить
@alaamohammed3491
@alaamohammed3491 - 16.03.2023 15:50

if I did have the same rule for multiple proprieties (with only different parameters like max Length), Is there a way I could make a delegate or any think like this that could point at the same rule. And use it with different proprieties and there corresponding parameters.
As it will be easier to make everything consistent, in case I wanted to change anything in the rule itself. Specially, that I have many Models and Dto that use the same rule.
Thanks.

Ответить
@haskell3702
@haskell3702 - 05.04.2023 18:38

This video has everything I was looking for, incredible, thank you!

Ответить
@faisalalhoqani6151
@faisalalhoqani6151 - 14.05.2023 09:39

Thank you dear for your detailed, quick, and straightforward demonstration.

Ответить
@DarkMetroid777
@DarkMetroid777 - 01.06.2023 21:13

Great video. Been diving into a dotnet project at work and needed some refreshers over this.

Ответить
@akalankagajasinghe5239
@akalankagajasinghe5239 - 21.06.2023 11:32

Fantastic playlist. Can this use for domain entity validation ?

Ответить
@DrunkyDude97
@DrunkyDude97 - 16.08.2023 13:46

How can we use fluent validation to validate the DTO like the behavior of Datanotations?
Because when the validation happen later on, some of the null fields might have taken their default values by the framework.
ex: int --> 0
Which would miss my validations.
So how can we validate beforehand?

Ответить
@badr6896
@badr6896 - 09.10.2023 20:28

how to return custom response ?

Ответить
@g0keyn
@g0keyn - 19.12.2023 20:01

Which extentions do you use in vs code? I realy need this info.

Ответить
@androidsavior
@androidsavior - 26.03.2024 00:38

What is the tool that suggests the code to you ?

Ответить
@androidsavior
@androidsavior - 26.03.2024 05:43

what is the name of the screen recorder you're using to do marks during recording ?

Ответить
@hasan_shans
@hasan_shans - 06.05.2024 12:15

Great video! Thanks!

Ответить
@ankitpanwar1494
@ankitpanwar1494 - 08.07.2024 16:01

Did you know how we convert fluent validation responses to custom class responses while using auto validation feature?

Ответить