Forum Xamarin.Forms

WebApi and Form Model Validation

powerdevpowerdev USMember


I have a Xamarin.Form app, and I am consuming an ASP.Net Web WebAPI with Model State for validation in my internal models. If I got a "bad request" my API return this oJSON object:

message: 'The request is invalid.',

modelState: {

    model.**Name**: [

        "The name is empty"


So, I want to simplify my work in the UI to read that result, my question are: How can I do to use this object for display the error in my UI? or Does Xamarin Form have any helper similar to ASP.NET MVC to display automatic the error in the UI (like validator @Html.ValidationMessageFor(model => model.Name)?



Sign In or Register to comment.