using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.Collections.Specialized;
using System.Reflection;
using Microsoft.AspNetCore.Mvc.ModelBinding;

namespace FMSAdmin.Helpers {
    public static class ModelStateDictionaryExtension {
        /*
         * start 로 시작하는 키 전부 제거
         * @param obj 객체
         **/
        public static void RemoveStartOf(this ModelStateDictionary obj, string start) {
            foreach (var key in obj.Keys) {
                if (key.IndexOf(start) == 0) {
                    obj.Remove(key);
                }
            }
        }
    }
}
