Комментарии:
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.
This fantastic stuff, really made me rethink how I do validation, I was just using if statments every where, this is much better, thank you sir!
ОтветитьHow to set focus to the first invalid element?
Ответитьwhat if first name = ' '
ОтветитьThis is a great video done sir
ОтветитьCan we pass a list of errors in the message?
ОтветитьCan you do conditional rules like first name and last name both can be empty, but if last name is not empty then first name cannot be empty
Ответитьgooood
ОтветитьCan fluent validation be used with WPF data binding?
ОтветитьThanks for this video!
ОтветитьI don’t have comments, I’m speechless Sir!!!
ОтветитьBlog post link does not work. It always redirects to homepage
Ответитьwould you kindly allow the source code again?
ОтветитьSimply useful. Thank you very much Tim.
ОтветитьGreat!
ОтветитьYou're really making it easy not only to learn C#, but also important programming concepts. Than you!
ОтветитьIs this related to Blazored.FluentValidation (from Chris Sainty)?
ОтветитьIs there a way to define the alignment of the data validation memo...the leftmost column ends up cutting off half the memo box
ОтветитьFluent validation is very useful I have used it in my project as server-side validation. Thank you Tim for
most valuable content and learning video .
is it possible to use dependency injection as it was a normal class? I mean I have a couple of entities to inject, should I use dependency injection as always?
ОтветитьReally nice video, helps to reduce a lot of dirty code 👌
ОтветитьThis one is worth the price of admission!! Great video and good information.
ОтветитьTotalLength doesn't work and I don't know why there is no solution
ОтветитьJust a little off-topic hint: When you do: "if (condition) return true; else return false;"
You can simply do instead: "return condition;"
Thanks, useful! Not possible to show the error in real-time under the associated TextBox? More user-friendly.
ОтветитьGreat video. It would be nice to have one using Blazor.
ОтветитьAny idea how to integrate validation for a combobox? I am trying to set the code so there has to be a selection from the combobox to pass validation
ОтветитьThis is a lesson I've overlooked over and over and guess what, I am actually redoing validation in my Application albeit a year after deployment! Well, Thank you Tim!
ОтветитьThanks for this great video! But the link for source code on one drive is not valid anymore. Can you share it again? Thanks.
ОтветитьThe problem with Fluent Validation is that it is only useful on the UI layer to make sure UI doesn't break the contract of the Application layer. Outside of UI layer this sort of validation belongs to the domain layer which should not have a dependency on any external resources.
ОтветитьGreat Course thanks! Do you do personal trainings as well?
ОтветитьThanks Tim, you are amazing !
ОтветитьThere is no link to the source code. Could you pleas attach it?
ОтветитьThank you, just what i was looking for
ОтветитьI think it would be better to have the error message popping up as a tooltip inside the field.
ОтветитьNice, I didn't know about fluent. Would you care to take a look at the one I did? It's called rainsoft validations and it's both in nuget and github.
ОтветитьTHANK YOU!
ОтветитьCan you please do videos on MediatR
ОтветитьDateTime as well as TimeSpan have their < > operators overloaded. So you can easy tell which one is "greater". You can also subtract a DateTime from another one. This will return you a TimeSpan.
ОтветитьSo you say if I'm a vampire I can't use your software because I can't enter my date of birth?! Thats not okay! And time travelers also can not??
ОтветитьI do not understand the point of this though as this only would work for text or string data, if I want to validate numbers or non-nullable fields I have to validate them beforehand like an int value cannot be null or will not accept letters, and I have to d that for every non-nullable field
Ответитьhi Tim, this was great video but i was searching on data Sanitization in .net core 3.1 like sql injection and Html tags. plz help me
ОтветитьA+++++ Thanks! Great video to get a person started; especially the last segment where you give the idea of creating all of your custom validation rules that return true/false and putting them in a local Nuget package to share.
ОтветитьHi Tim,
Is there a way that I can reuse validation from PersonModel to CreatePersonModel without checking field ID?
Hi Tim, I love your videos, but it would be lovely to have Advance Fastrack version of these videos for reference.
ОтветитьHi Tim,
In Fluent validation how to restrict a fields as only number
Hi Tim,
I have some struggles validating a BindableCollection<MyModel> . Is that even possible with FluentValidation?
What I mean is:
- I have a DataGrid binded to a BindableCollection<Model>
- Inside my model i have a string property (which will be binded to a DataGridTextColumn)
What I would like to achieve is to validate that column for duplicates entries.
I have a hard time with it.
Any tips?
Thanks in advance!
I downloaded the startcode, but it has no dependencies so I can't add reference and download the fluent. Anybody have experienced the same?
ОтветитьHello! I'm searching for fluent interfaces and I found fluent interfaces is bad for encapsulation and other OO concepts. Can someone say if it's true and what does that means? Thanks!
ОтветитьWhat a brilliant and helpful video! I hope I get it adapted in WPF.
Ответить