Server and Client Side Data Validation in ASP MVC Core and Learn to create custom attribute

preview_player
Показать описание

We will use Data Annotation to implement validation. Below are the data annotation we are going to use in this video

Required - To be put on mandatory fields so that user should not be able to submit blank values in those fields
Range - To validate the range i.e. year should be between 2000 to current date
EmialAddress - Validate email address
RegularExpression - If anything that can not be validated using available data annotations / Attributes we can use regular expression

We need to use above data annotation on our Model class and it will work for both Server side and client side validation

We will use tag helper named "asp-validation-for" to display the error message to user

And for client side validation we need to add following libraries to our project

1. jquery
2. jquery-validation
3. jquery-validation-unobtrusive

RECOMMENDATION :

You can also enroll to this course free using below link and keep track of your progress there

Subscribe to our YouTube channel to learn something new every week

You can support me by donating on

Thanks
Studymash
Рекомендации по теме
Комментарии
Автор

i found a lot of things in this video, ty sir.

farukakpnar
Автор

New look of intro is fantastic and eagerly waiting for next video. Could you please share that sooner, I see you publish video on Sunday usually

sunitakumari
Автор

It is quite helpful and interesting, eagerly waiting for the next video to learn something new 😃

ritikanarwal
join shbcf.ru