public static void ValidateModelForOther(OnlineRegPersonModel model, ModelStateDictionary modelState, int i)
        {
            if (model.Parent.SupportMissionTrip)
            {
                model.OtherOK = modelState.IsValid;
                return;
            }
            if (model.RecordFamilyAttendance())
            {
                model.OtherOK = true;
                return;
            }
            foreach (var ask in model.setting.AskItems)
            {
                switch (ask.Type)
                {
                case "AskEmContact":
                    if (!model.emcontact.HasValue())
                    {
                        modelState.AddModelError(model.Parent.GetNameFor(mm => mm.List[i].emcontact), "emergency contact required");
                    }
                    if (!model.emphone.HasValue())
                    {
                        modelState.AddModelError(model.Parent.GetNameFor(mm => mm.List[i].emphone), "emergency phone # required");
                    }
                    break;

                case "AskInsurance":
                    if (!model.insurance.HasValue())
                    {
                        modelState.AddModelError(model.Parent.GetNameFor(mm => mm.List[i].insurance), "insurance carrier required");
                    }
                    if (!model.policy.HasValue())
                    {
                        modelState.AddModelError(model.Parent.GetNameFor(mm => mm.List[i].policy), "insurance policy # required");
                    }
                    break;

                case "AskDoctor":
                    if (!model.doctor.HasValue())
                    {
                        modelState.AddModelError(model.Parent.GetNameFor(mm => mm.List[i].doctor), "Doctor's name required");
                    }
                    if (!model.docphone.HasValue())
                    {
                        modelState.AddModelError(model.Parent.GetNameFor(mm => mm.List[i].docphone), "Doctor's phone # required");
                    }
                    break;

                case "AskTylenolEtc":
                    if (!model.tylenol.HasValue)
                    {
                        modelState.AddModelError(model.Parent.GetNameFor(mm => mm.List[i].tylenol), "please indicate");
                    }
                    if (!model.advil.HasValue)
                    {
                        modelState.AddModelError(model.Parent.GetNameFor(mm => mm.List[i].advil), "please indicate");
                    }
                    if (!model.maalox.HasValue)
                    {
                        modelState.AddModelError(model.Parent.GetNameFor(mm => mm.List[i].maalox), "please indicate");
                    }
                    if (!model.robitussin.HasValue)
                    {
                        modelState.AddModelError(model.Parent.GetNameFor(mm => mm.List[i].robitussin), "please indicate");
                    }
                    break;

                case "AskSize":
                    if (model.shirtsize == "0")
                    {
                        modelState.AddModelError(model.Parent.GetNameFor(mm => mm.List[i].shirtsize), "please select a shirt size");
                    }
                    break;

                case "AskCoaching":
                    if (!model.coaching.HasValue)
                    {
                        modelState.AddModelError(model.Parent.GetNameFor(mm => mm.List[i].coaching), "please indicate");
                    }
                    break;

                case "AskSMS":
                    if (!model.sms.HasValue)
                    {
                        modelState.AddModelError(model.Parent.GetNameFor(mm => mm.List[i].sms), "please indicate");
                    }
                    break;

                case "AskDropdown":
                    string desc;
                    var    namedd = model.Parent.GetNameFor(mm => mm.List[i].option[ask.UniqueId]);
                    var    sgi    = ((AskDropdown)ask).SmallGroupChoice(model.option);
                    if (sgi == null || !sgi.SmallGroup.HasValue())
                    {
                        modelState.AddModelError(namedd, "please select an option");
                    }
                    else if (((AskDropdown)ask).IsSmallGroupFilled(model.GroupTags, model.option, out desc))
                    {
                        modelState.AddModelError(namedd, "limit reached for " + desc);
                    }
                    break;

                case "Askperson.Parents":
                    if (!model.mname.HasValue() && !model.fname.HasValue())
                    {
                        modelState.AddModelError(model.Parent.GetNameFor(mm => mm.List[i].fname), "please provide either mother or father name");
                    }
                    else
                    {
                        string mfirst, mlast;
                        Util.NameSplit(model.mname, out mfirst, out mlast);
                        if (model.mname.HasValue() && !mfirst.HasValue())
                        {
                            modelState.AddModelError(model.Parent.GetNameFor(mm => mm.List[i].mname), "provide first and last names");
                        }
                        string ffirst, flast;
                        Util.NameSplit(model.fname, out ffirst, out flast);
                        if (model.fname.HasValue() && !ffirst.HasValue())
                        {
                            modelState.AddModelError(model.Parent.GetNameFor(mm => mm.List[i].fname), "provide first and last names");
                        }
                    }
                    break;

                case "AskTickets":
                    if ((model.ntickets ?? 0) == 0)
                    {
                        modelState.AddModelError(model.Parent.GetNameFor(mm => mm.List[i].ntickets), "please enter a number of tickets");
                    }
                    break;

                case "AskYesNoQuestions":
                    for (var n = 0; n < ((AskYesNoQuestions)ask).list.Count; n++)
                    {
                        var a = ((AskYesNoQuestions)ask).list[n];
                        if (model.YesNoQuestion == null || !model.YesNoQuestion.ContainsKey(a.SmallGroup))
                        {
                            modelState.AddModelError(model.Parent.GetNameFor(mm => mm.List[i].YesNoQuestion[a.SmallGroup]), "please select yes or no");
                        }
                    }
                    break;

                case "AskExtraQuestions":
                    var eq = (AskExtraQuestions)ask;
                    if (model.setting.AskVisible("AnswersNotRequired") == false)
                    {
                        for (var n = 0; n < eq.list.Count; n++)
                        {
                            var a = eq.list[n];
                            if (model.ExtraQuestion == null || !model.ExtraQuestion[eq.UniqueId].ContainsKey(a.Question) ||
                                !model.ExtraQuestion[eq.UniqueId][a.Question].HasValue())
                            {
                                modelState.AddModelError(model.Parent.GetNameFor(mm => mm.List[i].ExtraQuestion[eq.UniqueId][a.Question]), "please give some answer");
                            }
                        }
                    }
                    break;

                case "AskText":
                    var tx = (AskText)ask;
                    if (model.setting.AskVisible("AnswersNotRequired") == false)
                    {
                        for (var n = 0; n < tx.list.Count; n++)
                        {
                            var a = tx.list[n];
                            if (model.Text == null || !model.Text[tx.UniqueId].ContainsKey(a.Question) ||
                                !model.Text[tx.UniqueId][a.Question].HasValue())
                            {
                                modelState.AddModelError(model.Parent.GetNameFor(mm => mm.List[i].Text[tx.UniqueId][a.Question]), "please give some answer");
                            }
                        }
                    }
                    break;

                case "AskCheckboxes":
                    var namecb  = model.Parent.GetNameFor(mm => mm.List[i].Checkbox[ask.UniqueId]);
                    var cb      = ((AskCheckboxes)ask);
                    var cbcount = cb.CheckboxItemsChosen(model.Checkbox).Count();
                    if (cb.Max > 0 && cbcount > cb.Max)
                    {
                        modelState.AddModelError(namecb, "Max of {0} exceeded".Fmt(cb.Max));
                    }
                    else if (cb.Min > 0 && (model.Checkbox == null || cbcount < cb.Min))
                    {
                        modelState.AddModelError(namecb, "Min of {0} required".Fmt(cb.Min));
                    }
                    break;

                case "AskGradeOptions":
                    if (model.gradeoption == "00")
                    {
                        modelState.AddModelError(model.Parent.GetNameFor(mm => mm.List[i].gradeoption), "please select a grade option");
                    }
                    break;
                }
            }
            var totalAmount = model.TotalAmount();

            if (model.setting.Deposit > 0)
            {
                if (!model.paydeposit.HasValue)
                {
                    modelState.AddModelError(model.Parent.GetNameFor(mm => mm.List[i].paydeposit), "please indicate");
                }
                else
                {
                    var amountToPay = model.AmountToPay();
                    if (model.paydeposit == true && amountToPay > totalAmount)
                    {
                        modelState.AddModelError(model.Parent.GetNameFor(mm => mm.List[i].paydeposit),
                                                 "Cannot use deposit since total due is less");
                    }
                }
            }
            if (model.OnlineGiving() && totalAmount <= 0)
            {
                modelState.AddModelError("form", "Gift amount required");
            }

            model.OtherOK = modelState.IsValid;
        }