private bool DoValidate(object value, out ValidatingExceptionMessage exceptionMessage) { exceptionMessage = null; if (DataTransactionHelper.IsDataTransactionObject(value)) { return(DataTransactionHelper.Validate(value, out exceptionMessage)); } IDataOwner dataOwner = PropertyOwner as IDataOwner; bool isPass = (dataOwner != null) ? dataOwner.Validate(value) : (CustomAttribute.IsRequired) ? Validate(value) : true; if (!isPass) { exceptionMessage = new ValidatingExceptionMessage(); exceptionMessage.Reference = PropertyOwner; exceptionMessage.ReferenceProperty = this; } return(isPass); }