添加指定操作的校验器

 

以下方法只能添加BOS配置的校验

FormOperation formOperation = this.BusinessInfo.GetForm().FormOperations.FirstOrDefault((FormOperation o) => o.Operation.EqualsIgnoreCase("UnAudit"));
if (formOperation != null && formOperation.Validations != null)
{
foreach (AbstractValidation current2 in formOperation.Validations)
{
if (current2.IsUsed)
{
AbstractValidator item = current2.CreateValidator();
e.Validators.Add(item);
}
}
}

 

posted @ 2024-06-17 15:25  木古白水  阅读(1)  评论(0编辑  收藏  举报