Last post Nov 14, 2017 09:55 AM by sukhdeep_kambo
Nov 14, 2017 05:25 AM|sukhdeep_kambo|LINK
What is the exact difference between following Attributes when applied on a property?
1. [DataType(DataType.PhoneNumber)] and [Phone]
2. [DataType.EmailAdress] and [EmailAddress]
Are they same or differ from each other at some point? Please assist.
Nov 14, 2017 05:50 AM|Rohit Rao|LINK
Both are used for validation, but the [DataType.###] attributes only provides client side validation. [EmailAddress] / [Phone] only provides server side validation.
You should give preference to [EmailAddress] attribute. But, You can use both for having client as well as server side validation.
Nov 14, 2017 09:55 AM|sukhdeep_kambo|LINK
Thank you very much