Himall验证帮助类是否是数值、 是否为邮政编码、是否是图片文件名、判断一个ip是否在另一个ip内
创始人
2024-02-14 01:27:36

 ///


        /// 是否为日期
        ///

        public static bool IsDate(string s)
        {
            return _dateregex.IsMatch(s);
        }

        ///


        /// 是否是数值(包括整数和小数)
        ///

        public static bool IsNumeric(string numericStr)
        {
            return _numericregex.IsMatch(numericStr);
        }

        ///


        /// 是否为邮政编码
        ///

        public static bool IsZipCode(string s)
        {
            if (string.IsNullOrEmpty(s))
                return true;
            return _zipcoderegex.IsMatch(s);
        }

        ///


        /// 是否是图片文件名
        ///

        ///
        public static bool IsImgFil

相关内容

热门资讯

中证A500ETF摩根(560... 8月22日,截止午间收盘,中证A500ETF摩根(560530)涨1.19%,报1.106元,成交额...
A500ETF易方达(1593... 8月22日,截止午间收盘,A500ETF易方达(159361)涨1.28%,报1.104元,成交额1...
何小鹏斥资约2.5亿港元增持小... 每经记者|孙磊    每经编辑|裴健如 8月21日晚间,小鹏汽车发布公告称,公司联...
中证500ETF基金(1593... 8月22日,截止午间收盘,中证500ETF基金(159337)涨0.94%,报1.509元,成交额2...
中证A500ETF华安(159... 8月22日,截止午间收盘,中证A500ETF华安(159359)涨1.15%,报1.139元,成交额...