【原创】XAF属性身份证的正则表达式

XAF属性身份证的正则表达式

        private string _identityid;
        [XafDisplayName("身份证号"), Size(40)]
        [ModelDefault("EditMaskType", "RegEx"), ModelDefault("EditMask", @"(\d{15})|(\d{17}([0-9]|X))"), 
ModelDefault("DisplayFormat", "{0:0}")] [RuleRegularExpression("identity", DefaultContexts.Save, @"(\d{15})|(\d{17}([0-9]|X))")] public string identityid { get { return _identityid; } set { SetPropertyValue("identityid", ref _identityid, value); } }

 

posted @ 2020-04-09 22:46  笑笑未来  阅读(224)  评论(0编辑  收藏  举报