public override void OnActionExecuted(ActionExecutedContext context)
        {
            var controller = context.Controller as Controller;

            if (controller?.TempData[Key] is string serializedModelState)
            {
                if (context.Result is ViewResult)
                {
                    var modelState = ModelStateHelper.DeserializeModelState(serializedModelState);

                    context.ModelState.Merge(modelState);
                }
                else
                {
                    controller.TempData.Remove(Key);
                }
            }

            base.OnActionExecuted(context);
        }