public PersonViewModel()
    {
        Children = new List<ChildViewModel>();
    }
    [Required(ErrorMessage = "Required!")]
    public string FName { get; set; }
    [Required(ErrorMessage = "Required!")]
    public string LName { get; set; }
    public List<ChildViewModel> Children{ get; set; }
 }
    public class ChildViewModel
 {
    [Required(ErrorMessage = "Required!")]
    public string FName { get; set; }
    [Required(ErrorMessage = "Required!")]
    public int Age { get; set; }
 }
my controller
    public ActionResult Index()
    {
        return View();
    }
    [HttpPost]
    public ActionResult Index(PersonViewModel person)
    {
        if (!ModelState.IsValid)
        {
            return View(person);
        }
        return View();
    }
    public ActionResult AddChildBox(PersonViewModel person,int id)
    {
        ViewBag.Counter = id;
        return PartialView("View");
    }
 }
I am calling partial view through ajax to create fields for child
    <script type="text/javascript">
    var num = 0;
    $("#AddChildBtn").click(function () {
        $.ajax({
            type: 'GET',
            url: '@Url.Content("~/Home/AddChildBox/")',
            data: {
                Id: num
            },
            dataType: 'html',
            success: function (result) {
                $('#Fields').append(result);
                num = num + 1;
            }
        });
    });
 </script>
in view show Children with this code
 @if (Model != null )
 {
    for (int i = 0; Model.Child.Count>i;i++ )
    {
        @Html.Action("AddChildBox", "Home", new { id = i })
    }
 }
and my partial view
@model WebApplication4.Models.PersonViewModel
@{
    int i = ViewBag.Counter;
}
<div class="form-group">
    @Html.LabelFor(model => model.Child[i].FName, htmlAttributes: new { @class = "control-label col-md-2" })
    <div class="col-md-10">
        @Html.EditorFor(model => model.Child[i].FName, new { htmlAttributes = new { @class = "form-control" } })
        @Html.ValidationMessageFor(model => model.Child[i].FName, "", new { @class = "text-danger" })
    </div>
</div>
<div class="form-group">
    @Html.LabelFor(model => model.Child[i].Age, htmlAttributes: new { @class = "control-label col-md-2" })
    <div class="col-md-10">
        @Html.EditorFor(model => model.Child[i].Age, new { htmlAttributes = new { @class = "form-control" } })
        @Html.ValidationMessageFor(model => model.Child[i].Age, "", new { @class = "text-danger" })
    </div>
</div>
This works, but when delete person from AddChildBox action method parameters, Validation messages for partial view fields not work.
I do not use it in my action , So why do I need it?
I am confused , who can explain to me what happen in this code?