i\'ve got a sign up wizard for new user registration. When I try to goto the 2nd page, I get validation errors because my User
object hasn\'t been fully populated,
public override void OnActionExecuting(ActionExecutingContext context)
{
var modelstate = context.ModelState;
var keys = modelstate.Keys.Where(x => ExculdeFeilds.Split(",").ToList().Contains(x));
foreach (var item in keys)
{
modelstate[item].ValidationState = ModelValidationState.Valid;
}
if (!modelstate.IsValid)
{
context.Result = new BadRequestObjectResult(context.ModelState);
}
}