Validating MVC Web Pages

As a web development best practice, your web page must validate any value that a user enters on the page.

When you scaffold your application, the generated views include a call to an HTML helper for each form field. These HTML helpers automatically generate validation code based on validation properties that you configured in your client message. The validation is performed using the NuGet packages jQuery Validation and Microsoft jQuery Unobtrusive Validation.

Refer to the following for more information: