Upgrading FluentValidation 4 to 5
Unknown4.0.0.1 → 5.6.2
UnknownUpgrade verdict
DepDelta hasn't looked for this range's notes yet, so breaking changes can't be ruled out.
In plain terms
- DepDelta hasn't finished looking for the notes in this range, so it can't rule out breaking changes yet.
- Their commits are listed with this comparison.
Must act Unknown for releases without notes
Releases without notes may still need changes. Check their commits before upgrading.
API changes
Generated by DepDelta from published .NET assemblies. Not mixed with prose notes.
- removed:
method IRuleBuilder.SetValidator(IValidator validator): IRuleBuilderOptions<T, TProperty> - changed:
interface IValidator extends IEnumerable, IEnumerable<IValidationRule> → interface IValidator - changed:
interface IValidator<T> extends IEnumerable, IEnumerable<IValidationRule>, IValidator → interface IValidator<T> extends IValidator - added:
class DependentRules<T> extends AbstractValidator<T> - added:
class ValidatorDescriptor.RulesetMetadata - added:
ctor DependentRules() - added:
ctor ValidationException(string message, IEnumerable<ValidationFailure> errors) - added:
ctor ValidatorDescriptor.RulesetMetadata(string name, IEnumerable<PropertyRule> rules) - added:
method AbstractValidator.CustomAsync(Func<T, Task<ValidationFailure>> customValidator): void - added:
method AbstractValidator.CustomAsync(Func<T, ValidationContext<T>, Task<ValidationFailure>> customValidator): void - added:
method AbstractValidator.ValidateAsync(T instance): Task<ValidationResult> - added:
method AbstractValidator.ValidateAsync(ValidationContext<T> context): Task<ValidationResult> - added:
method IValidationRule.ValidateAsync(ValidationContext context): Task<IEnumerable<ValidationFailure>> - added:
method IValidator.ValidateAsync(T instance): Task<ValidationResult> - added:
method IValidator.ValidateAsync(ValidationContext context): Task<ValidationResult> - added:
method IValidator.ValidateAsync(object instance): Task<ValidationResult> - added:
method ValidatorDescriptor.GetRulesByRuleset(): IEnumerable<ValidatorDescriptor.RulesetMetadata<T>> - added:
property ValidatorDescriptor.RulesetMetadata.Name: string { get; } - added:
property ValidatorDescriptor.RulesetMetadata.Rules: IEnumerable<PropertyRule> { get; } - added:
static method CollectionValidatorExtensions.SetCollectionValidator<T, TCollectionElement, TValidator>(IRuleBuilder<T, IEnumerable<TCollectionElement>> ruleBuilder, Func<T, TValidator> validator): CollectionValidatorExtensions.ICollectionValidatorRuleBuilder<T, TCollectionElement> - added:
static method DefaultValidatorExtensions.GreaterThan<T, TProperty>(IRuleBuilder<T, TProperty> ruleBuilder, Expression<Func<T, TProperty?>> expression): IRuleBuilderOptions<T, TProperty> - added:
static method DefaultValidatorExtensions.GreaterThan<T, TProperty>(IRuleBuilder<T, TProperty?> ruleBuilder, Expression<Func<T, TProperty?>> expression): IRuleBuilderOptions<T, TProperty?> - added:
static method DefaultValidatorExtensions.GreaterThanOrEqualTo<T, TProperty>(IRuleBuilder<T, TProperty> ruleBuilder, Expression<Func<T, TProperty?>> valueToCompare): IRuleBuilderOptions<T, TProperty> - added:
static method DefaultValidatorExtensions.LessThan<T, TProperty>(IRuleBuilder<T, TProperty> ruleBuilder, Expression<Func<T, TProperty?>> expression): IRuleBuilderOptions<T, TProperty> - added:
static method DefaultValidatorExtensions.LessThan<T, TProperty>(IRuleBuilder<T, TProperty?> ruleBuilder, Expression<Func<T, TProperty?>> expression): IRuleBuilderOptions<T, TProperty?> - added:
static method DefaultValidatorExtensions.LessThanOrEqualTo<T, TProperty>(IRuleBuilder<T, TProperty> ruleBuilder, Expression<Func<T, TProperty?>> expression): IRuleBuilderOptions<T, TProperty> - added:
static method DefaultValidatorExtensions.MustAsync<T, TProperty>(IRuleBuilder<T, TProperty> ruleBuilder, Func<T, TProperty, PropertyValidatorContext, Task<bool>> predicate): IRuleBuilderOptions<T, TProperty> - added:
static method DefaultValidatorExtensions.MustAsync<T, TProperty>(IRuleBuilder<T, TProperty> ruleBuilder, Func<T, TProperty, Task<bool>> predicate): IRuleBuilderOptions<T, TProperty> - added:
static method DefaultValidatorExtensions.MustAsync<T, TProperty>(IRuleBuilder<T, TProperty> ruleBuilder, Func<TProperty, Task<bool>> predicate): IRuleBuilderOptions<T, TProperty> - added:
static method DefaultValidatorExtensions.ValidateAndThrowAsync<T>(IValidator<T> validator, T instance): Task - added:
static method DefaultValidatorExtensions.ValidateAsync<T>(IValidator<T> validator, T instance, Expression<Func<T, object>>[] propertyExpressions): Task<ValidationResult> - added:
static method DefaultValidatorExtensions.ValidateAsync<T>(IValidator<T> validator, T instance, IValidatorSelector selector = …, string ruleSet = …): Task<ValidationResult> - added:
static method DefaultValidatorExtensions.ValidateAsync<T>(IValidator<T> validator, T instance, string[] properties): Task<ValidationResult> - added:
static method DefaultValidatorOptions.DependentRules<T, TProperty>(IRuleBuilderOptions<T, TProperty> rule, Action<DependentRules<T>> action): IRuleBuilderOptions<T, TProperty>
- removed:
method RuleBuilder.SetValidator(IValidator validator): IRuleBuilderOptions<T, TProperty> - added:
ctor DelegateValidator(Func<T, Task<IEnumerable<ValidationFailure>>> asyncFunc) - added:
ctor DelegateValidator(Func<T, ValidationContext<T>, Task<IEnumerable<ValidationFailure>>> asyncFunc) - added:
method DelegateValidator.ValidateAsync(ValidationContext context): Task<IEnumerable<ValidationFailure>> - added:
method DelegateValidator.ValidateAsync(ValidationContext<T> context): Task<IEnumerable<ValidationFailure>> - added:
method PropertyRule.ValidateAsync(ValidationContext context): Task<IEnumerable<ValidationFailure>> - added:
property MessageFormatter.AdditionalArguments: object[] { get; } - added:
property MessageFormatter.PlaceholderValues: Dictionary<string, object> { get; } - added:
property PropertyRule.DependentRules: List<IValidationRule> { get; }
- changed:
method IResourceAccessorBuilder.GetResourceAccessor(Type resourceType, string resourceName): Func<string> → method IResourceAccessorBuilder.GetResourceAccessor(Type resourceType, string resourceName): ResourceAccessor - changed:
method StaticResourceAccessorBuilder.GetResourceAccessor(Type resourceType, string resourceName): Func<string> → method StaticResourceAccessorBuilder.GetResourceAccessor(Type resourceType, string resourceName): ResourceAccessor - added:
class ResourceAccessor - added:
ctor ResourceAccessor() - added:
property ResourceAccessor.Accessor: Func<string> { get; set; } - added:
property ResourceAccessor.ResourceName: string { get; set; } - added:
property ResourceAccessor.ResourceType: Type { get; set; }
- added:
property ValidationFailure.ErrorCode: string { get; set; } - added:
property ValidationFailure.FormattedMessageArguments: object[] { get; set; } - added:
property ValidationFailure.FormattedMessagePlaceholderValues: Dictionary<string, object> { get; set; }
- changed:
ctor ValidatorTester(Expression<Func<T, TValue>> expression, IValidator<T> validator, TValue value) → ctor ValidatorTester(Expression<Func<T, TValue>> expression, IValidator<T> validator, TValue value, string ruleSet = …) - changed:
static method ValidationTestExtension.ShouldHaveValidationErrorFor<T, TValue>(IValidator<T> validator, Expression<Func<T, TValue>> expression, T objectToTest): void → static method ValidationTestExtension.ShouldHaveValidationErrorFor<T, TValue>(IValidator<T> validator, Expression<Func<T, TValue>> expression, T objectToTest, string ruleSet = …): void - changed:
static method ValidationTestExtension.ShouldHaveValidationErrorFor<T, TValue>(IValidator<T> validator, Expression<Func<T, TValue>> expression, TValue value): void → static method ValidationTestExtension.ShouldHaveValidationErrorFor<T, TValue>(IValidator<T> validator, Expression<Func<T, TValue>> expression, TValue value, string ruleSet = …): void - changed:
static method ValidationTestExtension.ShouldNotHaveValidationErrorFor<T, TValue>(IValidator<T> validator, Expression<Func<T, TValue>> expression, T objectToTest): void → static method ValidationTestExtension.ShouldNotHaveValidationErrorFor<T, TValue>(IValidator<T> validator, Expression<Func<T, TValue>> expression, T objectToTest, string ruleSet = …): void - changed:
static method ValidationTestExtension.ShouldNotHaveValidationErrorFor<T, TValue>(IValidator<T> validator, Expression<Func<T, TValue>> expression, TValue value): void → static method ValidationTestExtension.ShouldNotHaveValidationErrorFor<T, TValue>(IValidator<T> validator, Expression<Func<T, TValue>> expression, TValue value, string ruleSet = …): void
- removed:
property ChildCollectionValidatorAdaptor.Validator: IValidator { get; } - added:
abstract class AsyncValidatorBase extends PropertyValidator - added:
class AsyncPredicateValidator extends AsyncValidatorBase - added:
ctor AsyncPredicateValidator(Func<object, object, PropertyValidatorContext, Task<bool>> predicate) - added:
ctor ChildCollectionValidatorAdaptor(Func<object, IValidator> childValidatorProvider, Type childValidatorType) - added:
method ChildCollectionValidatorAdaptor.ValidateAsync(PropertyValidatorContext context): Task<IEnumerable<ValidationFailure>> - added:
method ChildValidatorAdaptor.ValidateAsync(PropertyValidatorContext context): Task<IEnumerable<ValidationFailure>> - added:
method DelegatingValidator.CheckCondition(object instance): bool - added:
method DelegatingValidator.ValidateAsync(PropertyValidatorContext context): Task<IEnumerable<ValidationFailure>> - added:
method IDelegatingValidator.CheckCondition(object instance): bool - added:
method IPropertyValidator.ValidateAsync(PropertyValidatorContext context): Task<IEnumerable<ValidationFailure>> - added:
method NoopPropertyValidator.ValidateAsync(PropertyValidatorContext context): Task<IEnumerable<ValidationFailure>> - added:
method PropertyValidator.ValidateAsync(PropertyValidatorContext context): Task<IEnumerable<ValidationFailure>> - added:
property AsyncValidatorBase.IsAsync: bool { get; } - added:
property ChildCollectionValidatorAdaptor.ChildValidatorType: Type { get; } - added:
property ChildCollectionValidatorAdaptor.IsAsync: bool { get; } - added:
property ChildValidatorAdaptor.IsAsync: bool { get; } - added:
property DelegatingValidator.IsAsync: bool { get; } - added:
property IPropertyValidator.IsAsync: bool { get; } - added:
property NoopPropertyValidator.IsAsync: bool { get; } - added:
property PropertyValidator.IsAsync: bool { get; } - added:
protected ctor AsyncValidatorBase(Expression<Func<string>> errorMessageResourceSelector) - added:
protected ctor AsyncValidatorBase(string errorMessage) - added:
protected ctor AsyncValidatorBase(string errorMessageResourceName, Type errorMessageResourceType) - added:
protected method AsyncPredicateValidator.IsValidAsync(PropertyValidatorContext context): Task<bool> - added:
protected method AsyncValidatorBase.IsValid(PropertyValidatorContext context): bool - added:
protected method AsyncValidatorBase.IsValidAsync(PropertyValidatorContext context): Task<bool> - added:
protected method PropertyValidator.IsValidAsync(PropertyValidatorContext context): Task<bool>