Home > Net >  How the Model Validation works in ASP.NET Core?
How the Model Validation works in ASP.NET Core?

Time:05-10

Currently I'm learning Razor Pages on the ASP .NET Core Docs, Part 8 of tutorial series on Razor Pages adding Validation to the application. I understand what is validation, on the client-side and the server-side, I know there's jQuery client-side validation to detects the errors.

My question is how it's work without applying migrations to the database??

CodePudding user response:

Model validation has nothing to do with databases. The model is validated based on the attributes applied to the model. The fact that some of those attributes can also be used by the database is irrelevant to the validation.

  • Related