forked from FluentValidation/FluentValidation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Changelog.txt
399 lines (351 loc) · 23.2 KB
/
Changelog.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
7.3 -
Major improvements to the AspNetCore integration including better collection support and optional support for implicit validators
Marked ValidationException as serializable when running on full framework
Updated EnumValidator's Flags support to handle the ~0 value
Fixed TestHelper checking for child validator would respond with the wrong type
Updated translations for some validators and fixed some incorrect language codes
Deprecate use of the ValidatorAttribute
7.2.1 - 24 October 2017
Introduce MessageFormatterFactory
Additional language translations
Additional checks to ensure HttpContext is registered
7.2 - 5 October 2017
Updated AspNetCore integration to support IValidatableObject
Updated AspNetCore integration to allow mixing multiple validation strategies in the same model
Updated AspNetCore integration to work with RulesetForClientsideMessagesAttribute, like MVC5
Resolved issue with auto generating property names for nested types in the CustomValidator when using AddFailure
Resolved issue where Custom sync/async invocation caused a NullReferenceException
Resolved an issue with AspNetCore clientside integration being resolved from the root-level service provider
Allow string.Empty in OverridePropertyName
7.1.1 - 25 July 2017
Resolved issue where incorrect property name was generated when using RuleForEach combined with SetValidator
Resolved an issue where nesting async validators inside DependentRules didn't wait for completion
7.1 - 28 June 2017
Merged pull request - improved messages in ShouldHaveChildValidator test extension
Merged pull request - test helper works with nested properties
Added additional overload of WithState that accepts a property value
Fixed StringLengthFluentValidationPropertyValidator generating the wrong comparison values when used in conjunction with the MaxLengthValidator and MinLengthValidator
*Breaking change* Signature change of PropertyValidator.CustomStateProvider
Add new RuleFor().Custom validator method as a replacement of the root-level Custom method
AssemblyScanner now excludes abstract and generic types.
Resolve issue with InvalidCastException when using lazy WithMessage with RuleForEach
7.0.3 - 7 June 2017
Added missing overload for WithMessage
Ensure LanguageManager.Culture takes precedence over the current thread's culture
7.0.2 - 26 May 2017
Various fixes to clientside validation in asp.net core
7.0.1 - 23 May 2017
Improve message for MinimumLength and MaximumLength validators in English (other translations would be welcome).
Added FluentValidationModelValidatorProvider.DisableDiscoveryOfPropertyValidators for backwards compatibility
7.0 - 19 May 2017
Switch to Netstandard based build process
Deprecated IResourceAccessorBuilder and merged the functionality into LocalizedStringSource
Deprecated all uses of expression-based localization. Use resourcename/resourcetype instead
Resolved issue with possible NullReferenceException in the AspNetCore clientside integration for length validators
Don't clear the ModelValidatorProviders collection by default in the AspNetCore integration (added new ClearValidatorProviders property to control this behaviour)
Assemblies are now signed
AssemblyVersion is no longer automatically incremented to avoid binding redirects
Removed the old FluentValidation.snk and replaced with FluentValidation-dev.snk (nuget releases use a separate snk not stored in git)
Ensure IValidatorFactory is resolved from request scope in asp.net core integration
Rewrote the localization support not to require satellite assemblies
Fix issue in WebApi integration where a property getter that throws an exception causes validation to fail
Fix issue in AspNetCore integration where we tried to resolve a collection validator in some situations where a class validator should be used
Improve SplitPascalCase method to support uppercase character sequences
ValidationResult.ErrorCode property now always returns the type of the PropertyValidator that generated the message, unless it's been explicitly overriden
Fix incorrect clientside validation attributes generated for email validator and credit card validator in the asp.net core integration
Fix child model validation in webapi integration
6.4.1 - 15 Mar 2017
Resolve issue where the accessor cache would incorrectly cache certain expressions on method calls that return members
Added the ability to disable the accessor cache
6.4 - 3 Mar 2017
AspNetCore support
Performance improvements for validatior instantiation
EnumValidator supports Flags
Add ValidationSeverity
Add support for collection validators on model-level rules
Fixes/cleanup to RegexValidator and LengthValidator
Async validators should run dependent rules
Clearer exception message when passing a null instance into the root-level Validate method
Additional overloads and clarity for WithMessage/WithLocalizedMessage overloads
6.2.1 - 26 Feb 2016
Fix DependentRules not working inside a top-level call to When
Fix enum validator to work correctly with nullable enums
6.2 - 22 Feb 2016
Make ChildValidatorAdaptor.GetValidator public
Make some of the private methods in FluentValidationModelValdiatorProvider protected instead of private
ValidatorSelectors are now globally configurable through ValidatorOptions.ValidatorSelectors
ValidatorSelectors can be overriden within the CustomizeValidatorAttribute
Added "Include" statement
Switched "dotnet" nuget library to uap10.0
Add Enum validator
6.1 - 18 Jan 2016
Overload of ValidateAndThrow supports rulesets.
Separate PCL to support Universal Win10 apps
6.0.2 - 5 Jan 2016
Fix issue with TestHelper not using correct overload.
6.0 - 22 Dec 2015
Core - Fixed DelegateValidator causes a deadlock when running an async function synchronously.
Core - Fixed Equal/NotEqual not working with structs
Core - Additional overload of SetValidator that takes a validatorProvider
Core - Additional overloads for Length and Matches that take a func for accessing comparison properties
Core - ValidationContext.IsChildContext is now public
Core - Add support for non-integer indexers in child collections
Core - Added Empty and Null validators (opposite of NotEmpty and NotNull)
Core - Add ErrorCode property
Core - Add support for Dependent Rules
Async - Added support for cancellation tokens
Async - Add support for conditionals
Async - Allow model-level rules with ValidateAsync
Localization - added translations for Polish and simple Chinese
Localization - Fixed name of Czech resource file
MVC/WebApi - Allow ValidatorAttribute on method parameters
WebApi - Add support for AddToModelState
5.6.2 - 29 May 2015
RegExValidator can now use a special {RegularExpression} placeholder in its error message.
Fix two crashes when using the PCL build
Fix issue with GetAssembly
5.6 - 22 May 2015
Patch - Added properties to Error that can be used to build customized message.
Fixed issue where setting global resource provider isn't propogated to metadata, breaking client-side messages
in some situations.
Patch - allow spaces in credit card numbers
Added Support model level-rules with RuleFor(x => x)
Fixed issue with PropertyChain not handling nulls/empty strings properly
Added support for rule dependencies
Added ValidatorDescriptor.GetRulesByRuleset
5.5 - 30 Oct 2014
Patch - Added optional RuleSet arguments to the validation test extensions.
Patch - Support MVC4/5 client-side validation for GreaterThanOrEqualToValidator
Patch - Support MVC4/5 client-side validation for LessThanOrEqualValidator
Patch - Remove duplication in Min/MaxFluentValidationPropertyValidator
Patch - Async validation for ChildCollectionValidatorAdaptor
Update nuget package for wpa81
5.4 - 03 Jul 2014
* Applied patch - Danish translation
* Applied patch - Improve DisplayName resolution performance
* Update WebApi/MVC dependencies
5.3 - 27 May 2014
* Fix issue https://fluentvalidation.codeplex.com/workitem/7183 (email address validation)
5.2 - 21 May 2014
* Added Czech and Finish translation of default error messages
* Allow nullable target properties for greater/less validators
* Apply pull request: RuleForEach doesn't respect When condition
5.1 - 11 Mar 2014
* Applied pull request: Apply the same display name resolving to the target property as to the source property.
* Applied pull request: Allow parent to be passed to child collection validator
* Applied pull request: Implement Async validation
* Applied pull request: Split WebApi into separate project
* Drop support for MVC 3
5.0 - 24 Oct 2013
* Display name is now lazily-loaded by default (as a result, localization via DisplayAttribute now works correctly)
* Added WebApi integration (contributed by dmorganb)
* Support for MVC 5 (package names are FluentValidation.Mvc5 and FluentValidation.Mvc5-signed)
* Remove support for partial trust
4.0 - 29 Apr 2013
* Add portable class library and deprecate the Silverlight-specific projects
* Added scale precision validator (thanks to Matthew Leibowitz)
* Added the ability to replace property rules (thanks to Matthew Leibowitz)
* Added a slightly better value type comparer (thanks to Matthew Leibowitz)
* Added RuleForEach
* Additonal overloads of Matches
* Added MemberAccessor (thanks to Mark Welsh)
* Fix issue where OverridePropertyName didn't work with SetValidator/SetCollectionValidator
* Add virtual CreateValidator method in to FluentValidationModelValidatorProvider
* Add custom error message builder
* *Breaking* LengthValidator no longer treats null inputs as length 0. This is now consistent with other validators.
* *Breaking* Change default error messages for Equal/NotEqual validators to use {ComparisonValue} rather than {PropertyValue} for consistency.
* All validators can now access the current property value inside the error message using {PropertyValue}
3.4 - 17 Aug 2012
* Make ValidationResut.IsValid virtual
* Add private no-arg ctor to ValidationFailure to help with serialization
* Add Turkish error messages
* Work-around for reflection bug in .NET 4.5
* BREAKING CHANGE - Assemblies are now unsigned.
3.3 - 30 March 2012
* Added additional overload for Must that accepts a PropertyValidatorContext.
* Allow rules not in a RuleSet to be executed in addition to rules in a ruleset, eg: validator.Validate(instance, ruleSet: "default,MyRuleset");
* Support Custom rules within top level When conditions.
* Russian localization
* MVC4 compatibility
3.2 - 14 November 2011
* Fixed issue #7084 (NotEmptyValidator does not work with EntityCollection<T>)
* Fixed issue #7087 (AbstractValidator.Custom ignores RuleSets and always runs)
* Removed support for WP7 for now as it doesn't support co/contravariance without crashing.
3.1 - 29 July 2011
* Support using nullables with cross-property comparisons (GreaterThan/GreaterThanOrEqual/LessThan/LessThanOrEqual)
* Deprecate and exclude mvc metadata extensions. This is out of scope for FV, but the code for this functionality is still in the repo if anyone still depends on this.
* Add support for shared conditions based on David Alpert's patch.
3.0.0.1 - 5 July 2011
* Workaround issue caused by referencing DataAnnotations in windows client projects (eg WPF). Does not affect web projects/silverlight.
3.0 - 25 June 2011
* Dropped compatibility for .NET 3.5 and MVC2.
* Removed the SupportsStandaloneValidation property - this was never properly implemented.
* Implemented Rule Sets
* Add support for CustomizeValidatorAttribute when using MVC integration.
* Remove generic PropertyRule<T> - use non-generic version instead.
* Better support for custom client-side error messages for LengthValidator.
* Add support for MVC3's IClientValidatable
* Implement client-side support for InclusiveBetween validator.
* Implement client-side support for Equal with cross-property validation.
* Implement client-side support for email validator.
* Added credit card validator (plus client side support)
* Add IValidatorInterceptor interface. This can be used to add pre/post hooks to MVC validation integration. An interceptor can either be specified as part of the CustomizeValidatorAttribute or implemented in the validator.
* Better handling of nullable value types.
* Add static FluentValidationModelValidatorProvider.Configure for configuring MVC integration with default options.
* Fixed edge case where custom property names didn't work for Required rules on non-nullable value types in MVC integration.
* Patch - Polish localization.
* Additional overloads of WithLocalizedMessage that support custom format args for consistency with WithMessage.
* Bug fix - overload for NotEqual that takes an expression and an IEqualityComparer did not use the comparer.
* Added the ability to specify which ruleset is used to generate client-side rules.
* Introduced SetCollectionValidator for validating collections (replaces non-generic overload of SetValidator)
* Better type safety using child collection validators.
* Better control of which elements in a child collection are validated using the new Where method.
* Support rules for nested properties at the top level (without needing to use a child validator)
* Support DisplayAttribute/DisplayNameAttribute for inferring property names
2.0 - 13 January 2011
* Fix typo in the name of FallbackAwareResourceAccessorBuilder
* Fix issue #7062 - allow validator selectors to work against nullable properties with overriden names.
* Fix error in German localization.
* Better support for clientside validation messages.
2.0 RC1 - 10 December 2010
* Allow custom MVC ModelValidators to be added to the FVModelValidatorProvider
* Support resource provider for custom property validators through the new IResourceAccessorBuilder interface
* Introduce WithLocalizedName
* Deprecated WithPropertyName - you should either use WithName or OverridePropertyName.
* *Breaking change* Rename IErrorMessageSource and its derivatives to IStringSource
* Updated ASP.NET MVC integration to MVC3 RC2
2.0 beta 2 - 9 November 2010
* Breaking change - Renamed the assembly names for SL/WP7 assemblies to FluentValidation.dll for consistency (formerly FluentValidation.Silverlight and FluentValidation.WP7)
* Breaking change - Finally removed the FV 1.1 backwards compatibility layer.
* Breaking chagne - Removed the deprecated Cascade() method - use Cascade(cascadeMode) instead (this was deprecated in 1.3)
* Provide more useful information in ValidationException error message.
* FluentValidatorModelMetadataProvider now converts NotNull/NotEmpty validators to IsRequired in metadata.
* Patch - updated German localization
* Using a child validator on a collection will now skip items in the collection that are null.
* NotEmptyValidator can now work against empty collections (must implement ICollection)
2.0 beta 1 - October 7 2010
* AttributedValidatorFactory is finally production worthy with the introduction of InstanceCache
* Fixed an issue where CascadeMode values are ignored if they're changed after the rules have been defined.
* Ported FluentValidation to WP7.
* ShouldHaveChildValidator test helper now works with child collection validators
* Simplified the implementation of SetValidator.
* MVC3 integration
1.3 - July 26 2010
* Added non-generic ValidationContext to allow for using Validator Selectors with non-generic IValidator instances
* Simplified the internal model
* Patch - Italian language resources
* Introduced IErrorMessageSource to abstract different mechanisms for building error messages
* Made ChildValidatorAdaptor public
* Silverlight build is now signed
* Allow cascade mode to be set at the validator level.
* Deprecated Cascade().StopOnFirstFailure() / Cascade().Continue() in favour of Cascade(cascadeMode) for consistency
* Deprecated PropertyRule.ReplaceCurrentValidator(newValidator) with PropertyRule.ReplaceValidator(originalValidator, newValidator)
* *Breaking change* Changed default behaviour of When/Unless. They now apply to all previous validators in the chain, not only to the current one. Previous behaviour can be maintained by using the overload that takes an ApplyConditionTo.
* NotEmpty now considers strings that contain whitespace as invalid.
* Added ShouldHaveChildValidator(x => x.Property, typeof(SomeChildValidator)) test extension
* xVal integration supports custom error messages
* Made IAttributeMetadataValidator public
1.2 for SL4 - April 29 2010
* Ported 1.2 codebase to Silverlight 4.
1.2 - March 11 2010
* Re-enabled MVC1 integration.
* Tweak ModelValidator behaviour so that all errors are run in one go (again)
* Added AssemblyScanner.
* Upgraded to MVC2 RTM.
1.2 beta 3 - Feb 14 2010
* Fixed issue with MVC2 MetaData throwing exceptions.
* Initial support additional options (such as When/Unless) on child validators. Needs refactoring for next version.
* Child validators no longer bypass the Validate method on the child validator instance.
* Tweak ModelValidator behaviour so that all errors are run in one go.
1.2 beta 2 - Feb 6 2010
* Issue #4903 - Allow Name Resolution to be pluggable
* Changed the .SetValidator method to require an IValidator<TProperty> rather than an IEnumerable<IValidationRule<TProperty>>
* Removed unnecessary CreateDescriptor overload from AbstractValidator.
* MVC2 Integration - FluentValidationModelValidatorProvider (serverside & clientside)
* MVC2 Integration - FluentValidationModelMetadataProvider
* Removed ComplexPropertyRule / NestedCollectionValidator. Replaced with IPropertyValidator implementations.
1.2 beta 1 - Jan 23 2010
* Upgraded MVC integration to ASP.NET MVC 2
* Model Binder now works with empty prefixes
* Added Adam Schroder xVal integration in the new FluentValidation.xValIntegration project (experimental)
* Allow the validator cascade mode to be set globally. The existing behaviour is the default (Continue). It can now also be set to StopOnFirstFailure:
ValidationOptions.CascadeMode = ValidatorCascadeMode.StopOnFirstFailure
* Allow the validator cascade mode to be set at the rule level (overrides the global option):
RuleFor(x => x.Surname).Cascade().StopOnFirstFailure()
* User state can be stored along side validation failures.
* Updated Silverlight project for Silverlight 3.
* Added the OnAnyFailure method. This delegate will be invoked if any rule attached to a particular RuleBuilder fails.
* Added ExactLengthValidator (error message needs localising...)
* Patch - Swedish language resources
* Added WithPropertyName
* Patch - InclusiveBetween/ExclusiveBetween validators.
* **Breaking Change** Removed generics from all the IPropertyValidator instances.
* Introduced PropertyValidator base class
* **Breaking Change** Removed the ValidationMessageAttribute
* **Breaking Change** Removed the DefaultResourceManager
* Simplified PropertyValidatorContext
* Adding ValidatorFactoryBase to make creation of Validator Factories easier.
* Additional overload of Custom that can access the current ValidationContext.
* **Breaking Change** Deprecated and removed the CommonServiceLocator implementation.
* Removed unnecessary IValidatorOptions interface.
* Added InlineValidator.
* Added ValidateAndThrow extension
1.1 - Jul 17 2009
* Spanish resource translations.
* French resource translations.
* EmailValidator now uses regex from http://hexillion.com/samples/#Regex
1.1 beta 3 - Jun 15 2009
* Patch - Dutch language resources
* Deleting the deprecated 'And' operator
* Major refactoring of the fluent interface.
* Adding an additional overload of Validate to IValidator<T> that takes an IValidatorSelector.
* Removing the IValidatorOfProperties interface
* Moved the methods that were on IValidatorOfProperties to extension methods on IValidator
* AbstractValidator now holds a collection of PropertyRules directly, rather than storing the intermediate RuleBuilders.
* Introduced the PropertyModel
* Marking AbstractValidator.CreateDescriptor as virtual.
* Adding a protected Rules property to ValidatorDescriptor.
* Allow a custom message to be definied in the ValidationMessageAttribute in addition to a resource key.
1.1 beta 2 - Jun 10 2009
* Added support for validating nested collections
* Implemented issue #4446: Additional property values can be accessed from within custom validation messages.
* *Breaking Change* Validation messages now use custom placeholders such as {PropertyName} rather than {0}, {1} etc. This means that custom validation messages arguments now start at 0.
* Added a ValidationMessage attribute which can be applied to property validator classes to specify the resource key to use when looking up the error message from the DefaultResourceManager.
* Now using a more comprehensive regular expression in the EmailValidator.
1.1 beta 1 - May 26 2009
* Validators can now be chained together: RuleFor(person => person.Address).SetValidator(new AddressValidator());
* Marked the 'And' property as obsolete. It is now possible to chain validators without it. This will be removed in the next release.
* Introduced ValidatorSelectors which allow certain validators to be excluded/excluded when validation occurs.
* Initial work on the metadata API (added ValidatorDescriptor).
* Added some additional marker interfaces to make obtaining metadata easier.
* Added FluentValidation Model Binder for use with ASP.NET MVC.
* Added ValidatorAttribute and AttributedValidatorFactory.
* Added the ability to use a custom ResourceManager in place of the DefaultResourceManager.
* Assemblies now marked as CLS Compliant.
* Public fields can now be validated.
* Made AbstractValidator.AddRuleBuilder public.
* Added overload for AbstractValidator.Custom that can return multiple ValidationFailures.
* Fixed issue #4236 - Error message for the 'Equals' validator showed the value entered not what the value should be.
* Fixed issue with AddToModelState - empty string prefix should be treated the same as a null prefix.
* Fixed issue with AddToModelState - SetModelValue should be called to ensure ASP.NET MVC's built-in HTML Helpers do not throw NullReferenceExceptions.
* Fixed issue with email address regex - plus character should be allowed.
* Fixed issue in Silverlight project - the Resource files were in the wrong namespace.
1.0 - Mar 27 2009
* Support for multiple validators on a single property by using 'And' RuleFor(person => person.Surname).NotNull().And.NotEqual("Foo");
* Added EqualValidator
* Custom validation messages are now formatted in the same way as the default messages
* Assemblies are now signed
0.3 - Jan 21 2009
* Added ShouldNotHaveValidationErrorFor extension method for testing
* Can now validate specified properties in addition to all properties (eg validator.Validate(person, x => x.Surname, x => x.Forename)
* New validators (RegularExpressionValidator and EmailValidator) contributed by Liam McLennan
* German localisation of validation messages contributed by Philipp Sumi
* Additional overload to 'Must' that takes a Func<T, TProperty, bool>
0.2 - Dec 29 2008
* Added Silverlight compatibility
* Moved support for the CommonServiceLocator into a separate assembly (FluentValidation.CommonServiceLocator.dll)
* Adding additional interfaces for some of the validators (ILengthValidator, INotNullValidator)
* AbstractValidator now implements IEnumerable<IRuleBuilder<T>>
* Added ShouldHaveValidationError extension method for testing validators
0.1 - Nov 1 2008
* First public preview