【原创】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); }
        }

 

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