Pages written using the Razor syntax can take advantage of both client-side and server-side validation. This validation is actually provided by the
jQuery.validate.js plug-in (script files) included with the default project template. Recall that the model already includes field-level validation rules using data annotations. These rules will be applied to the client code by ASP.NET when binding the model fields to the view. Of course, these same rules will process on the server, too.
The HTML helper methods and TagHelpers can be used to define validation; they require the
jquery.validate plug-in to be added to the view. Recall that the shared
_Layout.cshmtl page defined a section called
scripts for adding script files to ...