/// <summary> /// Allows ancestor VMs to define property validators for this VM. /// </summary> public void EnableParentValidation <TValue>(Func <TDescriptor, IVMPropertyDescriptor <TValue> > propertySelector) { Inspiring.Mvvm.Check.NotNull(propertySelector, nameof(propertySelector)); var op = OperationProvider.GetOperation(); var property = propertySelector((TDescriptor)op.Descriptor); op.EnablePropertyValidationSourceBehavior(property); op.EnableViewModelValidationSourceBehavior(); }
/// <summary> /// Allows ancestor VMs to define view model-level validators for this VM. /// </summary> public void EnableParentViewModelValidation() { var op = OperationProvider.GetOperation(); op.EnableViewModelValidationSourceBehavior(); }