示例#1
0
        public static string FromAtLeastOne(NumberSection model)
        {
            string atleat = "";

            if (model.atLeastOne)
            {
                atleat = atleat + "(?=.*[0-9])";
            }

            return(atleat);
        }
示例#2
0
        public static string FromAtLeastOne(NumberSection model, bool isOk)
        {
            string atleast = "";

            if (model.atLeastOne)
            {
                atleast = atleast + "0-9";
            }

            return(atleast);
        }
示例#3
0
        public static string FromNumber(NumberSection model)
        {
            string regexp = "";

            if (model.category == "All")
            {
                regexp = "0-9";
            }
            else if (model.category == "Custom")
            {
                regexp = FromCustomNumber(model.customNumber);
            }

            return(regexp);
        }