5:50 Instead of Regular Expression we can use [EmailAddress] validation attribute for email format validation.
@get_ready5 жыл бұрын
Pretty slick, thanks for sharing!
@sephiroth44884 жыл бұрын
MVP
@AmirKMilbes4 жыл бұрын
I have to disagree with this. [EmailAddress] allows entries like "Peter@test" which of course is missing the .something part. So ultimately, Venkat's RegularExpression version is better.
@NiazMohammad4 жыл бұрын
@@AmirKMilbes Even that regex is not good enough. it's just a format checker of the form abc@a.b; not an actual domain or email service provider checker. However, yes u r right, the regex by Venkat is better than [EmailAddress]
@abdelrahmanahmed77773 жыл бұрын
you can use System.Net.Mail as a type for Employee Email property instead of string
@GavinLon5 жыл бұрын
I really appreciate your teaching style.
@hetalchavan73794 жыл бұрын
at 8:20, after using [MaxLength(50,ErrorMessage ="Name can not exceed 50 characters")], it is not showing a validation message. Instead, it does allow user to enter more than 50 characters.(.net core 3.1)
@conaxlearn85664 жыл бұрын
I think you mean 'it does *not* allow user to enter....'?
@namanvohra82623 жыл бұрын
@@conaxlearn8566 It does allow
@anupambhardwaj75594 жыл бұрын
very helpful for beginners each an every topic explained very clearly
@gaganmudvari15535 жыл бұрын
waiting for you next video. great series . thank you vankat.
@pravendramsc5 жыл бұрын
Venkat Sir, your way to describe concept is fabulous thanks put your efforts
@DarkGT5 жыл бұрын
Simply fantastic! As always.
@sakthir38925 жыл бұрын
Dear Venkat sir, Thanks for effort to put videos.. keep rocking ...
@dangkolache5 жыл бұрын
Venkat, thank you as always. I have a question - if I am using EF Core, typically people do not use interfaces so you would pass along your db entity as your model properties. However, what if I only wanted to require certain values only on certain viewmodels? I cannot put the validation decorator on the db entity because then every viewmodel would use those decorators. Prior to using EF core, I would use an interface to create another class, but I do not have an interface with EF Core. Do I have to manually make a new class and manually map it to my db entity? Or use something like automapper? Or is there a cleaner way?
@conaxlearn85664 жыл бұрын
2:36 In later videos, if(ModelState.IsValid) was not used for adding and editing records. I've tried removing this check in the HomeController Create action and validation still works. So I don't know what this check is really being used for.
@hemantagrawal1122 Жыл бұрын
the validations are not working for me if i'm removing this if statement
@TT-ud5gf4 жыл бұрын
Where can we find a list of all possible attributes to use? Which keyword should I search MSDN?
@conaxlearn85664 жыл бұрын
This is how you find all attributes: 1. In the Employee model class, right-click on the [Required] attribute, then select 'Go to definition'. 2. Note that the RequiredAttribute class belongs to System.ComponentModel.DataAnnotations. 3. Google System.ComponentModel.DataAnnotations. The first result link should be the one you want to click into. 4. Just in case it did not get you there, here's the link: docs.microsoft.com/en-us/dotnet/api/system.componentmodel.dataannotations?view=net-5.0
@harshsugandhi0710 ай бұрын
I have a question, how do I perform validation on DropDown that we have created ?
@roadtripping2 жыл бұрын
At 9:45 I'm confused. In the Create actionmethod, you are returning View(); without any model. Yet when you post the form, all of your original inputs are persisted across posts - and the validation information is sent back too - but you never returned the model back with the view! You only did return View(); and not return View(employee); I wonder how your original data is being persisted across post backs?
@hemantagrawal1122 Жыл бұрын
it was not returning the Index method, it just simply return the create method
@aaravbhadani51955 жыл бұрын
you are legendary man!!
@puneetkankar5 жыл бұрын
This is very helpful thanks..
@VivekKumar-nt9wy5 жыл бұрын
Sir Thanks a lot for your amazing effort
@rohanrvs5 жыл бұрын
Do we have something like validation group property in dot net core. Something similar to validation controls in asp.net
@robmays69825 жыл бұрын
very enjoyable
@usamabaloch61784 жыл бұрын
[Required, MaxLength(50, ErrorMessage = "Name cannot exceed 50 characters")] is not working :( in asp.net core 3.1
@yasirirfan52627 ай бұрын
thumbs up
@rpabeginners45765 жыл бұрын
Thank you sir, i have problem in dropdownlist validations