总共有三类来完成验证工作,如下:
AttributeHandle.cs 类
View CodeValidateAttribute.cs 类
View CodeValidateType.cs 类
View Code调用:
string checkMessage = AttributeHandle.GetValidateResult(this);
if (!string.IsNullOrEmpty(checkMessage))
throw new Exception(checkMessage);
if (!string.IsNullOrEmpty(checkMessage))
throw new Exception(checkMessage);
