I can able to find lot of related answers to trim extra spaces in model input in ASP.NET MVC API.
Referred below links,
Posts are says that by implementing the IModelBinder method below we can achieve string values trim.
bool BindModel(HttpActionContext actionContext, ModelBindingContext bindingContext);
But the answers provided in the above links are with below signature.
object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
And I hope this is for MVC. Its not working for me in WEB API.
Any thoughts on this?