(#50) Model validations in asp.net core | Asp.Net Core tutorial

(#50) Model validations in asp.net core | Asp.Net Core tutorial

WebGentle

4 года назад

18,523 Просмотров

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


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

@maximilianponiatowski4745
@maximilianponiatowski4745 - 29.05.2022 00:01

How to override te default validation for types ? When i use double and that I try to write letters in the input i get the default "the value "hdhsk" is not valid", but how can I override this one ? I finded a way with using ModelState.Clear() before using ModelState.AddErrorMessage(...) with simple one field forms but with bigger one it's not so easy...

Ответить
@aayushpatel3152
@aayushpatel3152 - 12.05.2022 14:01

Jquery-validate and Jquery-validation-unobtrusive client-side libraries should be installed as well otherwise it won't work

Ответить
@SaurabhKumar-om2gz
@SaurabhKumar-om2gz - 05.02.2022 22:04

I could not able to understand how nullable field resolve the int and string compatibility. Can someone please clear this ?Thanks

Ответить
@vangpallysrinivas6982
@vangpallysrinivas6982 - 24.12.2021 20:38

hi sir
modelState.Isvalid is allways false how to resolve it

Ответить
@bhagwatshahi7244
@bhagwatshahi7244 - 23.01.2021 20:12

Thanks sir for the tutorial..i have a doubt when you post the data without filling all the required fields, error message is getting displayed that is fine but how does others fields remember their value since you are not passing the model back to the view...

Ответить
@saikrishnak6872
@saikrishnak6872 - 15.12.2020 21:22

If I want apply the data annotation validations to be fired on the view load for the first time, how can it be achieved?

Ответить
@wahyumaulanaakbar7920
@wahyumaulanaakbar7920 - 09.12.2020 18:59

i have one question sir, do we need validation attributes on the data (not the model) as well?
and can we create database-level validation as well?

Thank you so much been following this tutorial

Ответить
@dmytroskydanenko5106
@dmytroskydanenko5106 - 14.06.2020 17:41

Huge respect to you, sir!
Your explanations are excellent, way more better than anyone that I've heard.
After your tutorials I'd really understood what it was all about.
You've made a great job. Thanks a lot for that!

Ответить
@asadbekkhasanov6578
@asadbekkhasanov6578 - 05.06.2020 11:53

fucking awesome. keep up

Ответить
@funwithvanshika4405
@funwithvanshika4405 - 28.05.2020 21:55

Hi Nitesh
One thing strange i noticed that total page error not showing "Total Page" text and even same thing for me

Ответить
@pp-zc4to
@pp-zc4to - 07.05.2020 08:22

very good sir. waiting for next one.

Ответить