Skip to content

Commit 40173a3

Browse files
authored
Update README.md
1 parent 18e53f9 commit 40173a3

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
1-
# how-to-do-custom-validation-using-validationattribute-of-aspnet-mvc
2-
ValidationAttribute class is included in DataAnnotations namespace. It helps you to validate model data received from user.
1+
# How to do custom Validation using Validationattribute of ASP.NET MVC
2+
3+
ValidationAttribute class is included in DataAnnotations namespace. It helps you to validate model data received from user. It gives you many in built validation attributes like StringLength, Required, DataType for validating model.
4+
5+
## Files
6+
7+
1. **[Customer Details View](https://github.com/geeksarray/how-to-do-custom-validation-using-validationattribute-of-aspnet-mvc/blob/master/FirstMVC/FirstMVC/Views/Home/CustomerDetails.cshtml)** - html view having Customer details.
8+
1. **[Model Class with Custom Validation](https://github.com/geeksarray/how-to-do-custom-validation-using-validationattribute-of-aspnet-mvc/blob/master/FirstMVC/FirstMVC/Models/ValidJoinDate.cs)** - has implemented ValidationAttribute class to achieve custom validation of Join Date of Customer.
9+
1. **[Customer Model](https://github.com/geeksarray/how-to-do-custom-validation-using-validationattribute-of-aspnet-mvc/blob/master/FirstMVC/FirstMVC/Models/Customer.cs)** - with custom validation attribute used for JoinDate property.
10+
11+
Below picture show implementation of Custom Validation attribute
12+
13+
![Custom Validation attribute in ASP.NET MVC](http://dotnetmentors.com/Images/asp-net-mvc-custom-validation.png)
14+
15+
For more details visit - [Custom Validation Attribute in ASP.NET MVC](https://geeksarray.com/blog/how-to-do-custom-validation-using-validationattribute-of-aspnet-mvc)
16+

0 commit comments

Comments
 (0)