Closed roverell closed 7 years ago
You can now do this either globally by providing a settings object to the constructor of ValidationHelper
like this:
Validator = new ValidationHelper(new ValidationSettings
{
DefaultRuleSettings = new ValidationRuleSettings
{
ExecuteOnAlreadyInvalidTarget = true
}
});
Or by changing the settings of a specific validation rule with the new WithSettings
method:
Validator.AddAsyncRule(...).WithSettings(s => s.ExecuteOnAlreadyInvalidTarget = false);
@roverell You can install a pre-release NuGet package from here: https://www.nuget.org/packages/MvvmValidation/3.1.0-beta1. Please give it a try and let me know if it works for you.
I'm looking to use this library to perform multiple validation checks, and returning/displaying any failures.
I notice you explicitly only return the first invalid rule (see below), and I understand that this is likely the most sensible response in most cases. However, would you consider providing an option on the constructor or as a property to bypass this and return all results?