/// <summary> /// Defines a custom validator that is executed after an an item of the /// selected collection has changed. /// </summary> /// <remarks> /// The validator is also executed when a revalidation is performed, the /// VM is added to/removed from a collection or any descendant VM has /// changed (a property or its validation state). /// </remarks> public void Custom(Action <CollectionValidationArgs <TOwnerVM, TItemVM> > validationAction) { _operation.PushValidatorBuildActions( DelegateValidator.For(validationAction), ValidationStep.ViewModel ); }
/// <summary> /// Defines a custom validator that is executed every time the selected /// property is about to change. /// </summary> /// <remarks> /// The validator is also executed when a revalidation is performed, or /// the VM is added to/removed from a collection. /// </remarks> public void Custom(IValidator validator) { _operation.PushValidatorBuildActions( validator, ValidationStep.Value ); }