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); } }
原文地址:https://www.cnblogs.com/qy1234/p/12670255.html
时间: 2024-10-13 08:14:09