diff --git a/Stylet/ValidatingModelBase.cs b/Stylet/ValidatingModelBase.cs index 343fab4..5ad0b85 100644 --- a/Stylet/ValidatingModelBase.cs +++ b/Stylet/ValidatingModelBase.cs @@ -184,6 +184,30 @@ namespace Stylet } } + /// + /// Clear all property errors + /// + protected virtual void ClearAllPropertyErrors() + { + List changedProperties; + + this.propertyErrorsLock.Wait(); + try + { + changedProperties = this.propertyErrors.Keys.ToList(); + this.propertyErrors.Clear(); + } + finally + { + this.propertyErrorsLock.Release(); + } + + if (changedProperties.Count > 0) + { + this.OnValidationStateChanged(changedProperties); + } + } + /// /// Validate a single property synchronously, by name ///