Yes. ModelState is part of ViewData. Therefore, you can get it using:
filterContext.Controller.ViewData.ModelState
For example, if you want to enter some code after the action, but only if ModelState.IsValid == true , you can do:
public override void OnActionExecuted(ActionExecutedContext filterContext) { if (!filterContext.Controller.ViewData.ModelState.IsValid) return;
source share