home / software / tips and tricks / How to Add Form Validation to Core 6 Razor Pages?

How to Add Form Validation to Core 6 Razor Pages?

Updated:  01/19/2022 17:01 PM
Author:  Shiju Mathews

Status:    Resolved.


1. Add the form fields as below to the form



2. Add asp-validation-summary if desired



3. Add DataAnnotations to the models


4. Add partial pages to the desired Razor Page.


5. Add a new class to the /css/site.css file
Tags: How to Add Form Validation to Core 6 Razor Pages?
Updated on: April 2024