【原创】XAF属性设置不为空

XAF字段属性RuleRequiredField设置不为空

        private string _FatherName;
        [XafDisplayName("父亲姓名"), Size(50)]      
        [RuleRequiredField(DefaultContexts.Save, CustomMessageTemplate = "父亲姓名不可为空")]
        public string FatherName
        {
            get { return _FatherName; }
            set { SetPropertyValue<string>(nameof(FatherName), ref _FatherName, value); }
        }
原文地址:https://www.cnblogs.com/qy1234/p/12670296.html