Updated link from MSDN to docs (#6419)
parent
d3814fe891
commit
371b27fc19
|
@ -21,7 +21,7 @@ When a client sends data to your web API, often you want to validate the data be
|
|||
|
||||
## Data Annotations
|
||||
|
||||
In ASP.NET Web API, you can use attributes from the [System.ComponentModel.DataAnnotations](https://msdn.microsoft.com/library/system.componentmodel.dataannotations.aspx) namespace to set validation rules for properties on your model. Consider the following model:
|
||||
In ASP.NET Web API, you can use attributes from the [System.ComponentModel.DataAnnotations](/dotnet/api/system.componentmodel.dataannotations) namespace to set validation rules for properties on your model. Consider the following model:
|
||||
|
||||
[!code-csharp[Main](model-validation-in-aspnet-web-api/samples/sample1.cs)]
|
||||
|
||||
|
|
Loading…
Reference in New Issue