/MvcCoreCustomModelValidation_Demo

This article explain how to create custom model validation in ASP.net core. We have model validation in System.ComponentModel.DataAnnotations namespace. Validation attributes let you specify validation rules for model properties. We can create custom validation attributes, create a class that inherits from ValidationAttribute, and override the IsValid method.

Primary LanguageC#

MvcCoreCustomModelValidation_Demo

This article explain you how to create custom model validation in asp.net core. We have model validation in System.ComponentModel.DataAnnotations namespace. Validation attributes let you specify validation rules for model properties. We can create custom validation attributes. Create a class that inherits from ValidationAttribute, and override the IsValid method.

link https://www.c-sharpcorner.com/article/custom-model-validation-in-asp-net-core-3-1/