How to create powerful validation with FluentValidation in .NET apps

How to create powerful validation with FluentValidation in .NET apps

Codewrinkles

2 года назад

4,958 Просмотров

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


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

Conrad Akunga
Conrad Akunga - 01.06.2023 19:17

I don't believe you need the condition for the ProductImageValidator - if the collection of ProductImages is empty, nothing will be executed anyway.

Ответить
Ankit Asthana
Ankit Asthana - 12.04.2023 16:57

Nice Video!!!

Ответить
Jacked Latino
Jacked Latino - 20.02.2023 07:40

Awesome video.

Ответить
Christian Ista
Christian Ista - 03.01.2023 23:30

I have an API, the validation message should be returned in several languages. In the Person class there is a property Language, how can I return the error messages in the right language (fr, en, de)?

Ответить
Mohamed Al-Qadeery
Mohamed Al-Qadeery - 29.06.2022 02:58

hello im still a beginner .. i dont understand why i should validate domain model when im going to use FluentValidation to validate the Dtos and if the validate success then im going to map it to domain models using automapper .. so am i wrong that there is no need to validate domain models?

Ответить
Tarik Alkathiri
Tarik Alkathiri - 26.06.2022 18:35

I just notes that in the ProductValidator constructor you set a rule for product price which must be > 0 line 15
and then in the ValidatePrduct method you check for price <= 0 and throwing exception line 20.
Aren't those line equivalent or there is another purpose for that.
Thank you very much.

Ответить
Tarik Alkathiri
Tarik Alkathiri - 24.06.2022 21:20

Excellent and smooth explanation.
Thank you very much.

Ответить
semen083
semen083 - 23.06.2022 14:26

What the point is using static constructor for Product class instead of regular? The no way to use validation in former?

Ответить
Mohamed Al-Qadeery
Mohamed Al-Qadeery - 23.06.2022 12:24

Thank you for the video .. can you make a video about crud with nested resources wired up to front end ?

Ответить
Vlad Marţian
Vlad Marţian - 23.06.2022 11:48

It would be intresting to me to see how you get the Rich Domain Objects from a Database eventually using EF. Should I use DTOS ?

Ответить
Daniel Dieppa
Daniel Dieppa - 23.06.2022 04:32

Thanks very much for this great videos. I like my validators out of the domain layer, I dont like to make the domain dependant on an external package. But then what is the best way to do it? Maybe that could be another video. Thanks again for the great content

Ответить
saeful rahman
saeful rahman - 23.06.2022 03:30

thanks, well explained

Ответить
VP
VP - 23.06.2022 03:00

Thank you for making more videos

Ответить
No name
No name - 23.06.2022 00:33

Thanks very much. Love to see more on this topic including how it is wired up to front end as well.

Ответить
Daniele Giovanetti
Daniele Giovanetti - 22.06.2022 23:15

Very powerful video, well explained. My best compliment.

Ответить