Upgrading FluentValidation 1 to 2
Unknown1.3.0 → 2.0.0
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.
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 IRuleBuilderInitial.Cascade(): CascadeStep<T, TProperty> - removed:
static class ObsoleteExtensions - removed:
static method DefaultValidatorExtensions.SetValidator<T, TCollectionProperty, TCollectionElement>(IRuleBuilder<T, TCollectionProperty> ruleBuilder, IValidator<TCollectionElement> validator): IRuleBuilderOptions<T, TCollectionProperty> - removed:
static method ObsoleteExtensions.AppendProperyName(MessageFormatter formatter, string name): MessageFormatter - removed:
static method ObsoleteExtensions.SetValidator<T, TProperty>(IRuleBuilder<T, TProperty> rule, IPropertyValidator<T, TProperty> validator): IRuleBuilderOptions<T, TProperty> - removed:
static method ObsoleteExtensions.Validate<T>(IValidator<T> validator, T instance, IValidatorSelector selector): ValidationResult - changed:
class ValidationContext extends ValidationContext<object> → class ValidationContext - changed:
class ValidationContext<T> → class ValidationContext<T> extends ValidationContext - changed:
interface IValidationRule<T> → interface IValidationRule - changed:
method IRuleBuilder.SetValidator(IValidator<TProperty> validator): IRuleBuilderOptions<T, TProperty> → method IRuleBuilder.SetValidator(IValidator validator): IRuleBuilderOptions<T, TProperty> - added:
interface IValidationRule<T> extends IValidationRule - added:
method IValidationRule.Validate(ValidationContext context): IEnumerable<ValidationFailure> - added:
method IValidator.CanValidateInstancesOfType(Type type): bool - added:
method IValidatorDescriptor.GetRulesForMember(string name): IEnumerable<IValidationRule> - added:
method ValidatorDescriptor.GetRulesForMember(string name): IEnumerable<IValidationRule> - added:
property IValidationRule.Validators: IEnumerable<IPropertyValidator> { get; } - added:
property ValidationContext.InstanceToValidate: object { get; } - added:
static method DefaultValidatorOptions.OverridePropertyName<T, TProperty>(IRuleBuilderOptions<T, TProperty> rule, string propertyName): IRuleBuilderOptions<T, TProperty> - added:
static method DefaultValidatorOptions.WithLocalizedMessage<T, TProperty>(IRuleBuilderOptions<T, TProperty> rule, Expression<Func<string>> resourceSelector, IResourceAccessorBuilder resourceAccessorBuilder): IRuleBuilderOptions<T, TProperty> - added:
static method DefaultValidatorOptions.WithLocalizedName<T, TProperty>(IRuleBuilderOptions<T, TProperty> rule, Expression<Func<string>> resourceSelector): IRuleBuilderOptions<T, TProperty> - added:
static method DefaultValidatorOptions.WithLocalizedName<T, TProperty>(IRuleBuilderOptions<T, TProperty> rule, Expression<Func<string>> resourceSelector, IResourceAccessorBuilder resourceAccessorBuilder): IRuleBuilderOptions<T, TProperty>
- removed:
class ValidationMessageAttribute extends Attribute - removed:
ctor ValidationMessageAttribute() - removed:
property ValidationMessageAttribute.Key: string { get; set; } - removed:
property ValidationMessageAttribute.Message: string { get; set; } - removed:
static method ValidationMessageAttribute.GetMessage(Type type): string
- removed:
class MemberValidatorSelector implements IValidatorSelector - removed:
ctor MemberValidatorSelector(IEnumerable<MemberInfo> members) - removed:
method MemberValidatorSelector.CanExecute<T>(PropertyRule<T> rule, string propertyPath): bool - removed:
method PropertyRule.ReplaceCurrentValidtor(IPropertyValidator newValidator): void - removed:
method RuleBuilder.Cascade(): CascadeStep<T, TProperty> - removed:
static method MemberValidatorSelector.FromExpressions<T>(IEnumerable<Expression<Func<T, object>>> propertyExpressions): MemberValidatorSelector - changed:
class DelegateValidator<T> implements IValidationRule<T> → class DelegateValidator<T> implements IValidationRule, IValidationRule<T> - changed:
class PropertyRule<T> implements IValidationRule<T> → class PropertyRule implements IValidationRule - changed:
ctor PropertyRule(MemberInfo member, PropertySelector propertyFunc, Expression expression, Func<CascadeMode> cascadeModeThunk) → ctor PropertyRule(MemberInfo member, PropertySelector propertyFunc, Expression expression, Func<CascadeMode> cascadeModeThunk, Type typeToValidate) - changed:
method DefaultValidatorSelector.CanExecute<T>(PropertyRule<T> rule, string propertyPath): bool → method DefaultValidatorSelector.CanExecute(PropertyRule rule, string propertyPath): bool - changed:
method IValidatorSelector.CanExecute<T>(PropertyRule<T> rule, string propertyPath): bool → method IValidatorSelector.CanExecute(PropertyRule rule, string propertyPath): bool - changed:
method MemberNameValidatorSelector.CanExecute<T>(PropertyRule<T> rule, string propertyPath): bool → method MemberNameValidatorSelector.CanExecute(PropertyRule rule, string propertyPath): bool - changed:
method RuleBuilder.SetValidator(IValidator<TProperty> validator): IRuleBuilderOptions<T, TProperty> → method RuleBuilder.SetValidator(IValidator validator): IRuleBuilderOptions<T, TProperty> - changed:
property PropertyRule.CustomPropertyName: string { get; set; } → property PropertyRule.CustomPropertyName: IStringSource { get; set; } - changed:
protected method PropertyRule.InvokePropertyValidator(ValidationContext<T> context, IPropertyValidator validator): IEnumerable<ValidationFailure> → protected method PropertyRule.InvokePropertyValidator(ValidationContext context, IPropertyValidator validator): IEnumerable<ValidationFailure> - added:
class InstanceCache - added:
class PropertyRule<T> extends PropertyRule implements IValidationRule, IValidationRule<T> - added:
ctor InstanceCache() - added:
ctor PropertyRule(MemberInfo member, PropertySelector propertyFunc, Expression expression, Func<CascadeMode> cascadeModeThunk, Type typeToValidate, Type containerType) - added:
method DelegateValidator.Validate(ValidationContext context): IEnumerable<ValidationFailure> - added:
method InstanceCache.GetOrCreateInstance(Type type): object - added:
method InstanceCache.GetOrCreateInstance(Type type, Func<Type, object> factory): object - added:
method PropertyRule.Validate(ValidationContext context): IEnumerable<ValidationFailure> - added:
property DelegateValidator.Validators: IEnumerable<IPropertyValidator> { get; } - added:
property PropertyRule.TypeToValidate: Type { get; } - added:
static method MemberNameValidatorSelector.FromExpressions<T>(Expression<Func<T, object>>[] propertyExpressions): MemberNameValidatorSelector
- removed:
class LocalizedErrorMessageSource implements IErrorMessageSource - removed:
class StringErrorMessageSource implements IErrorMessageSource - removed:
ctor LocalizedErrorMessageSource(Type resourceType, string resourceName) - removed:
ctor StringErrorMessageSource(string errorMessage) - removed:
interface IErrorMessageSource - removed:
method IErrorMessageSource.BuildErrorMessage(): string - removed:
method LocalizedErrorMessageSource.BuildErrorMessage(): string - removed:
method StringErrorMessageSource.BuildErrorMessage(): string - removed:
property IErrorMessageSource.ResourceName: string { get; } - removed:
property IErrorMessageSource.ResourceType: Type { get; } - removed:
property LocalizedErrorMessageSource.ResourceName: string { get; } - removed:
property LocalizedErrorMessageSource.ResourceType: Type { get; } - removed:
property StringErrorMessageSource.ResourceName: string { get; } - removed:
property StringErrorMessageSource.ResourceType: Type { get; } - removed:
static method LocalizedErrorMessageSource.CreateFromExpression(Expression<Func<string>> expression): IErrorMessageSource - added:
class FallbackAwareResourceAccessorBuilder extends StaticResourceAccessorBuilder - added:
class LocalizedStringSource implements IStringSource - added:
class StaticResourceAccessorBuilder implements IResourceAccessorBuilder - added:
class StaticStringSource implements IStringSource - added:
ctor FallbackAwareResourceAccessorBuilder() - added:
ctor LocalizedStringSource(Type resourceType, string resourceName, IResourceAccessorBuilder resourceAccessorBuilder) - added:
ctor StaticResourceAccessorBuilder() - added:
ctor StaticStringSource(string message) - added:
interface IResourceAccessorBuilder - added:
interface IStringSource - added:
method IResourceAccessorBuilder.GetResourceAccessor(Type resourceType, string resourceName): Func<string> - added:
method IStringSource.GetString(): string - added:
method LocalizedStringSource.GetString(): string - added:
method StaticResourceAccessorBuilder.GetResourceAccessor(Type resourceType, string resourceName): Func<string> - added:
method StaticStringSource.GetString(): string - added:
property IStringSource.ResourceName: string { get; } - added:
property IStringSource.ResourceType: Type { get; } - added:
property LocalizedStringSource.ResourceName: string { get; } - added:
property LocalizedStringSource.ResourceType: Type { get; } - added:
property StaticStringSource.ResourceName: string { get; } - added:
property StaticStringSource.ResourceType: Type { get; } - added:
protected method FallbackAwareResourceAccessorBuilder.GetResourceProperty(ref Type resourceType, ref string resourceName): PropertyInfo - added:
protected method StaticResourceAccessorBuilder.GetResourceProperty(ref Type resourceType, ref string resourceName): PropertyInfo - added:
static method LocalizedStringSource.CreateFromExpression(Expression<Func<string>> expression, IResourceAccessorBuilder resourceProviderSelectionStrategy): IStringSource
- removed:
class PropertyValidatorResult - removed:
ctor PropertyValidatorResult(string error) - removed:
property PropertyValidatorResult.Error: string { get; } - removed:
property PropertyValidatorResult.IsValid: bool { get; } - removed:
static method PropertyValidatorResult.Failure(string error): PropertyValidatorResult - removed:
static method PropertyValidatorResult.Success(): PropertyValidatorResult
- removed:
class CascadeStep<T, TProperty> - removed:
ctor CascadeStep(IRuleBuilderInitial<T, TProperty> ruleBuilder) - removed:
method CascadeStep.Continue(): IRuleBuilderInitial<T, TProperty> - removed:
method CascadeStep.StopOnFirstFailure(): IRuleBuilderInitial<T, TProperty>
- removed:
class PropertyValidatorContext<T, TProperty> - removed:
ctor PropertyValidatorContext(string propertyDescription, T instance, Func<T, TProperty> propertyValueFunc) - removed:
ctor PropertyValidatorContext(string propertyDescription, T instance, Func<T, TProperty> propertyValueFunc, string customError, IEnumerable<Func<T, object>> customFormatArgs) - removed:
interface IPropertyValidator<T> - removed:
interface IPropertyValidator<TInstance, TProperty> extends IPropertyValidator<TInstance> - removed:
method IPropertyValidator.Validate(PropertyValidatorContext<TInstance, TProperty> context): PropertyValidatorResult - removed:
method PropertyValidatorContext.GetFormattedErrorMessage(Type type, MessageFormatter formatter): string - removed:
property PropertyValidatorContext.CustomError: string { get; } - removed:
property PropertyValidatorContext.Instance: T { get; } - removed:
property PropertyValidatorContext.PropertyDescription: string { get; } - removed:
property PropertyValidatorContext.PropertyValue: TProperty { get; } - changed:
class ChildValidatorAdaptor<T> extends NoopPropertyValidator → class ChildValidatorAdaptor extends NoopPropertyValidator - changed:
ctor ChildValidatorAdaptor(IValidator<T> validator) → ctor ChildValidatorAdaptor(IValidator validator) - changed:
property DelegatingValidator.ErrorMessageSource: IErrorMessageSource { get; set; } → property DelegatingValidator.ErrorMessageSource: IStringSource { get; set; } - changed:
property IPropertyValidator.ErrorMessageSource: IErrorMessageSource { get; set; } → property IPropertyValidator.ErrorMessageSource: IStringSource { get; set; } - changed:
property NoopPropertyValidator.ErrorMessageSource: IErrorMessageSource { get; set; } → property NoopPropertyValidator.ErrorMessageSource: IStringSource { get; set; } - changed:
property PropertyValidator.ErrorMessageSource: IErrorMessageSource { get; set; } → property PropertyValidator.ErrorMessageSource: IStringSource { get; set; } - added:
class ChildCollectionValidatorAdaptor extends NoopPropertyValidator - added:
ctor ChildCollectionValidatorAdaptor(IValidator childValidator) - added:
method ChildCollectionValidatorAdaptor.Validate(PropertyValidatorContext context): IEnumerable<ValidationFailure> - added:
property ChildCollectionValidatorAdaptor.Validator: IValidator { get; }