Validating model properties WCF Web APi
I have a set of services hosted with WCF Web Api, what I need to do is validate the properties inside the models of the app. In MVC 3 for example I decorate properties in the model like this: [StringLength(30)] public string UserName { get; set; } and then in the controller I proceed like this to verify os the model has met the validation parameters: [HttpPost] ActionResult Create(Model myModel) { if(ModelState.IsValid(){ Post the model } else { Don't post the model } } Is there a way to do something similar in WCF Web Api? Antony Scott Firstly I should say awesome question+answer Daniel