4
Someone has an example of how to create a field validation in an HTML page using Data Annotation, Web API and C#.
In MVC with you, this is easily achieved by using Wizard when creating a View.
4
Someone has an example of how to create a field validation in an HTML page using Data Annotation, Web API and C#.
In MVC with you, this is easily achieved by using Wizard when creating a View.
1
First Dataannotation is the properties that lie on top of the fields of your model
ex:
[Required]
[Display(Name = "User name")]
[EmailAddress(ErrorMessage = "E-mail em formato inválido.")]
A simple and direct article: http://eduardopires.net.br/2013/04/mvc-validando-dados-com-dataannotations/
Browser other questions tagged c# html5 asp.net-web-api
You are not signed in. Login or sign up in order to post.
understand that when using Webapi you will only work with receiving and sending json, the validation of Dataannotation is valid, because MVC is the one that yields its inputs, in the case of Webapi, the most interesting, would be you return a JSON with the errors that will be in Modelstate and then you send them by View
– Rod
Ah, just a detail, you CAN use data Annotation yes, don’t misunderstand, however it’s like I explained above =)
– Rod