private void DoUpdate() { ValidationCollection.Clear(); ProcessValidation(); ValidationObject v = ChangeDependencyObject.GetOverallValidation(this); this.ValidationCollection.AddValidation(null, v.Code, v.Message); Changed = true; }
public void MergeValidation(ValidationObject validationObject) { if (validationObject != null) { if (this.PropertyName == validationObject.PropertyName || string.IsNullOrEmpty(this.PropertyName)) { if (this.Code < validationObject.Code) { this.Code = validationObject.Code; } if (!this.Message.Contains(validationObject.Message)) { this.Message += "\r\n" + validationObject.Message; if (this.Message.StartsWith("\r\n", StringComparison.OrdinalIgnoreCase)) { this.Message = this.Message.Substring(2); } } } } }