forked from FluentValidation/FluentValidation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Changelog.txt
879 lines (743 loc) · 46 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
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
11.10.0 - 15 Sep 2024
Add WhereAsync as conterpart to Where on collection rules (#2240)
Create IEnumValidator to expose the targeted Enum type of EnumValidator (#2244)
Add Romansh language translations (#2239)
11.9.2 - 10 Jun 2024
ScalePrecisionValidator error message clarification (#2211)
11.9.1 - 23 Apr 2024
Fix issue with CascadeMode on child validators (#2207)
11.9.0 - 21 Dec 2023
Fix memory leak in NotEmptyValidator/EmptyValidator (#2174)
Add more descriptive error messages if a rule throws a NullReferenceException (#2152)
Add support for caching root parameter expressions (eg RuleFor(x => x)) (#2168)
Add builds for .net 8
Prevent AddValidatorsFromAssemblyContaining from registering validators twice (#2182)
11.8.1 - 22 Nov 2023
Fix unintentional behavioural changes in introduced in the previous release as part of #2158
11.8.0 - 19 Oct 2023
Added AbstractValidator.OnRuleAdded to allow customization of rule instances after creation (#2114)
Fix Serbian translation of LengthValidator (#2147)
Fix chinese culture codes (#2151)
Add Khmer translations (#2155)
Various performance improvements (#2158)
Fix ChildRules with class hierarchies (#2165)
11.7.1 - 12 Aug 2023
Resolved issue with combining multiple ValidationResult instances where RuleSetsExecuted wasn't properly set on the combined result (#2125)
11.7.0 - 11 Aug 2023
Add additional constructor for combining multiple ValidationResult instances (#2125)
Add PropertyPath placeholder (#2134)
Fix Brazilian Portuguese translation (#2131)
11.6.0 - 4 Jul 2023
Add OnFailurecCreated callback in ValidatorOptions.Global (#2120)
Fix typo in Russian localization (#2102)
Add Tajik language (#2108)
Fixed some typos in Validator Extension docblocks (#2118)
11.5.2 - 7 Apr 2023
Resolve issue with ruleset propogation for multiple levels of child rules (#2097)
11.5.1 - 20 Feb 2023
Deprecated the ability to disable the root model null check via overriding AbstractValidator.EnsureInstanceNotNull (#2069)
Deprecated the Transform and TransformAsync methods (#2072)
11.5.0 - 13 Feb 2023
MemberNameValidatorSelector now supports wildcard indexes in property paths (#2056)
Added overload of TestValidateAsync that accepts a context (#2052)
Minor optimization to regex validator (#2035)
Added Kazakh translations (#2036)
Added Catalan translations and updated Spanish translations (#2050)
Updates to Uzbek Latin and Cyrillic translations (#2040/#2041/#2045)
Updates to Italian translations (#2039)
Updates to French translations (#2065)
11.4.0 - 23 Nov 2022
Deprecate ScalePrecision validator and introduce PrecisionScale validator as its replacement (#2030)
11.3.0 - 10 Nov 2022
Annotate string parameters with StringSyntaxAttribute.Regex in net7 builds (#1957)
Fixes to SourceLink integration (#2019)
Add Uzbek Latin and Cyrillic languages (#2013)
Updates to Danish language (#2012)
11.2.2 - 11 September 2022
MemberNameValidatorSelector should make use of PropertyNameResolver when parsing expressions (#2003)
11.2.1 - 28 August 2022
Fix test helper .Only() not taking into account parent-level unmatched failures (#1986)
11.2.0 - 8 August 2022
Resolve issue with unexpected results when with nested Include calls with the MemberNameValidatorSelector (#1989)
Add a new Selector Factory for the Composite Selector (#1988)
11.1.1 - 6 August 2022
Fix issue with incorrect rulesets being executed in a child validator when combined with ChildRules (#1981)
Bulgarian translations of default messages (#1973)
11.1.0 - 22 June 2022
Added a ToDictionary method to ValidationResult
MVC auto validation: Deprecated Implicit validation of child properties (#1960)
MVC auto validation: Deprecated Implicit validation of root collection elements (#1960)
Deprecated InjectValidator (#1960)
Deprecate validator factories (#1961)
Introduce services.AddFluentValidationAutoValidation() and services.AddFluentValidationClientsideAdapters() as replacements for services.AddFluentValidation() (#1965)
Remove duplication between sync and async validation in the internal model.
11.0.3 - 10 June 2022
Fix an issue where an exception would be thrown when calling ValidateAsync if a rule was wrapped with a call to WhenAsync. (#1955)
11.0.2 - 27 May 2022
Child validator contexts should contain a reference to their parent context (#1945)
Support deserialization of ValidationResult using System.Text.Json (#1928)
11.0.1 - 7 May 2022
Fix regression in the Test Helper affecting the With* and Without* assertion methods (#1937)
11.0.0 - 30 Apr 2022
Ensure property covariance is properly handled throughout the internal model (#1713)
Throw exceptions when async validator is invoked synchronously (#1705)
Removal deprecated OnFailure/OnAnyFailure callbacks.
Remove deprecated RunDefaultMvcValidationAfterFluentValidationExecutes option from ASP.NET integration.
Remove deprecated Options property from RuleComponent.
Remove deprecated TestHelper methods.
Remove PropertyValidator backwards compatibility layer.
Add method Only() asserting that no other validation errors were raised.
10.4.0 - 11 Mar 2022
Allow use of "*" with RuleSetForClientSideMessagesAttribute and HttpContext.SetRulesetForClientsideMessages (#1912)
Fix Azerbaijani language code (#1874)
10.3.6 - 13 Dec 2021
Fix Azerbaijani language code (#1865)
Setting DisableAutomaticValidation to true should prevent implicit validation running (#1868)
Enable package validation (#1860)
10.3.5 - 30 Nov 2021
Fixed ThrowOnFailures not being passed through if context creation requires type conversion (#1863).
10.3.4 - 22 Oct 2021
Clientside messages shouldn't be generated for the lazy version of LessThanOrEqual/GreaterThanOrEqual (#1818)
Remove enumerable boxing in Empty/NotEmpty validators (#1823)
10.3.3 - 24 Aug 2021
Remove reference type constraint for TestValidate (#1815)
10.3.1 - 19 Aug 2021
Fix scale precision error message when digits is calculated as negative (#1790)
Shared conditions shouldn't rely on object hashcode for unique ID (#1810)
10.3.0 - 9 July 2021
Update Russian translations (#1761)
Add Thai translations (#1768)
Add Azerbaijani translations (#1770)
Deprecate the old test helper methods in favour of TestValidate.
Deprecate OnFailure and OnAnyFailure callbacks.
10.2.3 - 3 Jun 2021
Resolve issue with rulesets not cascading correctly to Inheritance Validators (#1754)
10.2.2 - 1 Jun 2021
Add backwards compatibility overloads for validator registration methods.
10.2.1 - 30 May 2021
Optional internal type registration should work with MVC registration (#1748)
10.2.0 - 28 May 2021
Display name generation should be consistent between RuleForEach and RuleFor.ForEach (#1231)
Allow AddFluentValidation to be called directly on IServiceCollection (#1726)
Throw exception on ValidateAndThrow even if PreValidate prevents further Validation (#1736)
ValidationException now includes rule severity (#1733)
Optionally support internal types when scanning assemblies for validators (#1742)
Deprecate RunDefaultMvcValidationAfterFluentValidationExecutes in MVC configuration. Use DisableDataAnnotationsValidation instead.
10.1.0 - 28 April 2021
Allow default severity level to be set globally (#1715)
Extend use of variance into the internal API to resolve invalid cast exceptions in some scenarios (#1711)
Fix clientside metadata being incorrectly generated for cross-property LessThanOrEqual/GreaterThanOrEqual (#1721)
10.0.4 - 17 April 2021
Fix a bug where async conditions were sometimes run synchronously.
10.0.3 - 15 April 2021
Fix ArgumentOutOfRangeException when condition returns false for RuleForEach containing multiple components (#1698)
10.0.2 - 9 April 2021
Expose ErrorCode property on IRuleComponent.
10.0.1 - 8 April 2021
Add GetPropertyValue method to IValidationRule<T>
Fix context parameter types on IValidationRule.ApplyCondition and ApplyAsyncCondition.
10.0.0 - 6 April 2021
Please review the upgrade guide for 10.0: https://docs.fluentvalidation.net/en/latest/upgrading-to-10.html
Performance improvements.
Collection rules now only iterate the collection once.
Property validators are now generic.
Internal API now uses generics.
Deprecated non-generic PropertyValidator.
Various property validator options have been seperated into RuleComponents.
Various parts of the internal API are now internal (PropertyRule, CollectionPropertyRule etc).
ValidatorDescriptor now returns rule components in various places.
Changed type of ValidationResult.Errors from IList<ValidationFailure> to List<ValidationFailure>
Default service lifetime is now Scoped rather than Transient.
Combine IActionContextValidatorInterceptor and IValidatorInterceptor.
Changes to the ASP.NET Client Validator Adaptor interfaces. These now receive the rule component.
Removed deprecated IStringSource and its inheritors.
Removed deprecated FormattedMessageArguments from ValidationFailure.
Removed other deprecated code.
9.5.4 - 5 April 2021
Fix Serbian translation of error messages (#1683)
Add Vietnamese translations of error messages (#1677)
9.5.3 - 15 March 2021
Fix Swedish translation for CreditCardValidator (#1664)
9.5.2 - 8 March 2021
Fix Dutch translation of some errors (#1653)
Fix string equality comparison in WithCustomState extension (#1658)
9.5.1 - 11 February 2021
Fix incorrect wording in deprecation message for Transform (#1613)
Fix ScalePrecision validator being available in intellisense for non-decimal properties.
Expose additional overload of Transform that receives the root object in the transformer.
9.5.0 - 31 January 2021
Introduce new syntax for applying transformations and deprecate the old syntax (#1613)
9.4.0 - 14 January 2021
ChildRules now work as expected when inside a ruleset (#1597)
Added ImplicitlyValidateRootCollectionElements option to MVC integration (#1585)
9.3.0 - 10 November 2020
Support for .NET 5
Improvements to LanguageManager's lazy loading of resources.
Deprecate IStringSource and its implementors. Use delegates instead.
CustomizeValidatorAttribute now works in Razor pages (netcore 3.1 and net 5.0 only) (#1541)
RuleSetForClientSideMessagesAttribute now works in Razor pages (netcore 3.1 and net 5.0 only) (#1544)
Fixes to Spanish translations.
9.2.2 - 20 September 2020
Fix one of the inheritance validator overloads not working correctly (#1528)
9.2.1 - 19 September 2020
Add non-generic Add method to inheritance validator.
Updates to Persian translations (#1513)
Added Bengali translations (#1517)
9.2.0 - 26 August 2020
Add inheritance validator (#1237)
Performance improvements.
9.1.3 - 19 August 2020
Fix an issue with IncludeRulesNotInRuleSet not working correctly (#1493)
9.1.2 - 12 August 2020
Make the ValidationContext.ThrowOnFailures getter public.
9.1.1 - 8 August 2020
Update StopOnFirstFailure deprecation message.
9.1 - 8 August 2020
Make ruleset separator character splitting consistent (#1424)
Transform now works with RuleForEach (#1450)
Introduce constants for rulesets (#1435)
Resolve issue when attempting to use asynchronous conditions in a synchornous validaiton run (#1438)
Added asynchronous versions of the TestHelper methods (#1423)
Introduce CascadeMode.Stop and deprecate CascadeMode.StopOnFirstFailure to resolve confusion/abiguity about setting the cascade mode at validator-level (#1437)
RaiseValidationException can be overridden to customize the exception throwing process (#1162)
Add new Validate extension methods that allow options to be configured using a strategy (#1467)
9.0.1 - 14 July 2020
Fix assembly version was still 8.
9.0 - 6 July 2020
Removed support for netstandard1.1, netstandard1.6 and net45 (net461 still supported)
Removed support for unsupported .NET Core versions (2.2 and 3.0). LTS versions are supported (2.1 and 3.1)
Default email validation mode now uses the same logic as ASP.NET Core. Previous regex behaviour is opt-in.
TestHelper advanced mode now has more features (see https://docs.fluentvalidation.net/en/latest/testing.html#advanced-test-extensions)
Equal/NotEqual now perform ordinal comparison when used with string properties
Severity can now be set dynamically with a callback
Removed WithLocalizedMessage (WithMessage that takes a callback is the replacement)
Removed ResourceName from ValidationFailure
Removed ResourceName and ResourceType from IStringSource.
Removed SetCollectionValidator which was deprecated in 8.0
Removed DelegatingValidator which was deprecated in 8.x.
Additional overload of OnAnyFailure that can receive a collection of validation failures
Remove DisplayAttribute integration and reference to DataAnnotations.
ComparisonProperty placeholder is now formatted like PropertyName
Translations of default error messages into other languages are now lazily-loaded
PropertyValidator.ShouldValidateAsync reanamed to ShouldValidateAsynchronously to remove confusion where the naming suggested this was an async method
PropertyValidatorContext.Instance renamed to InstanceToValidate for consistency with ValidationContext.
Removed various methods from MessageFormatter that were deprecated in 8.x
Added Slovenian translations of default error messages.
Added Icelandic translations of default error messages.
Added WithMessageArgument to the test helpers.
Transform can now be used to transform property values to other types.
FluentValidationModelValidatorProvider and FluentValidationModelValidator are now public.
Add additional overload of SetValidator that takes a Func that receives the current property value.
Work around a bug in ASP.NET Core's integration testing components that can cause ConfigureServices to run multiple times.
SourceLink integration.
{CollectionIndex} placeholder can now be accessed in child validators.
Additional ValidationException constructor that allows using both the default message and a custom one together.
ScalePrecisionValidator algorithm now matches SQL Server.
Additional overload of the When methods that contain the validation context.
Automatically scanned types can be excluded when calling RegisterValidatorsFromAssemblyContaining in ASP.NET Core projects.
New AutomaticValidationEnabled property for use in ASP.NET Core projects (defaults to true).
8.6.2 - 29 February 2020
Fix CollectionIndex placeholder not working with async workflow.
8.6.1 - 28 December 2019
Add explicit netcoreapp3.1 target to ASP.NET Core integration.
8.6.0 - 4 December 2019
Add support for ASP.NET Core 3.1
Fixed issue with property indexers being incorrectly stripped out when using test extensions.
AddToModelState no longer includes a dot if PropertyName is null
8.5.1 - 2 November 2019
Ensure lazily loaded calls to WithMessage can be used for client-side validation, provided they don't attempt to access model properties from inside the delegate (eg when using IStringLocalizer).
Fix issue where OnFailure didn't work properly when invoked on validators with conditions.
8.5.0 - 24 September 2019
Add ASP.NET Core-compatible version of the email address validator.
Simplify the advanced testhelper syntax.
Add support for ASP.NET Core 3.
Add support for defining child rules inline.
ValidatorDescriptor now has consistent handling of model-level rules.
RuleForEach can now access collection index in error message with {CollectionIndex} placeholder.
Welsh language translations of default error messages.
Hungrian language translations of default error messages.
Indonesian language translations of default error messages.
Using RuleForEach combined with When is now more intuitive.
Fixed order of rule execution when using async validation.
8.4.0 - 10 May 2019
Added simplified version of several messages across all translations to aid with ASP.NET Clientside validation.
New enum validator for string properties.
8.3.0 - 24 April 2019
Fix issue in ASP.NET Core integration with GetServiceProvider not working correctly when invoked against a CustomContext/MessageBuilderContext.
Improved how LanguageStringSource works with error-code overrides.
Fix thread-safety issue with use of PropertyValidatorOptions.Empty (now removed).
Improved how calls to When/Unless are handled internally.
DelegatingValidator is now marked as deprecated.
Improvements to Croatian language translations.
Improvements to Georgian language translations.
Resolved subtle bug where top-level WhenAsync wouldn't work correctly when wrapping a top-level call to When.
8.2.3 - 12 April 2019
Fix issue with WebApi integration where DataAnnotations validation could generate duplicate messages when used in the same
project as FluentValidation.
8.2.2 - 5 April 2019
Fix typo in FluentValidation.DependencyInjectionExtensions package name.
8.2.1 - 4 April 2019
Resolved issue using InjectValidator with RuleForEach.
Add support for a default IValidatorInterceptor to be registered with the ASP.NET Core Service Provider.
Added "Without" test extensions for consistency with existing "With" text extensions.
8.2.0 - 26 March 2019
Add extensions for injecting child validators using the ASP.NET Core Service Provider.
WithLocalizedMessage is deprecated. Use the overload of WithMessage that takes a Func instead.
Implement RuleFor(...).ForEach(...) as an alternative to RuleForEach
8.1.3 - 25 January 2019
Resolved issue where clientside validation was incorrectly generating metadata for rules with shared conditions.
ScalePrecisionValidator now has a public method in the fluent interface.
Fix placeholder names in ScalePrecisionValidator for consistency.
Updates to Portuguese (Brazil) translations.
8.1.2 - 18 December 2018
Fix the same issue from 8.1.1 but for async conditions.
Fix issue where shared When/Unless conditions didn't execute correctly when used with RuleForEach.
8.1.1 - 11 December 2018
Added RuleSetsExecuted property to ValidationResult.
Fix issue with shared condition cache incorrectly caching when used with RuleForEach.
8.1.0 - 6 December 2018
Added format support for message placeholders.
Added support for overriding indexers for collection rules.
Allow ErrorCode to be used to override localization key in the Language Manager.
Additional error details are now shown in the ShouldNotHaveValidationErrorFor test extension.
Conditions defined with root-level When/WhenAsync/Unless/UnlessAsync are now only executed once (instead of once for each rule).
Support Otherwise method chained from root-level When/WhenAsync/Unless/UnlessAsync.
Minor wording changes to default English error messages.
Added Skip property to MVC5's CustomizeValidatorAttribute to bring parity with AspNetCore and WebApi integration.
Japanese translation of the default error messages.
Remove type constraint on the OverridePropertyName overload that takes an expression.
8.0.101 - 24 November 2018
Fix clientside property comparison validation adaptor in ASP.NET Core integration.
8.0.100 - 4 September 2018
Added Greek language translation.
Resolved an issue where Cascade and Transform couldn't be used with RuleForEach
8.0.0 - 16 Aug 2018
Support validating only specific properties by path.
Allow specifying a ruleset with SetValidator for complex properties.
Introduce PropertyValidatorOptions in order to clean up the IPropretyValidator interface.
Moved the AttributedValidatorFactory into a separate package.
IStringSource.GetString now takes a context.
Major cleanup of asynchronous validation workflow.
Deprecate SetCollectionValidator in favour of RuleForEach().SetValidator
Remove the pre-7 version of Custom/CustomAsync.
Removed deprecated localization system.
Remove deprecated RemoveRule/ReplaceRule/ClearRules methods.
7.6.105 - 11 August 2018
Added Albanian language translations
Added Chinese Traditional language translation
Fix #858 ValidationTestExtension.When() incorrectly checks each failure instead of all failures
7.6.104 - 6 July 2018
Added AbstractValidator.PreValidate to allow immediate cancellation of validation.
7.6.103 - 16 June 2018
Using [BindProperty] in AspNetCore now works when implicit child validation is disabled.
ShouldHaveChildValidator now works when the child validator is inside a DependentRules block.
Test helpers are now compatible with custom property name resolvers set using ValidatorOptions.PropertyNameResolver.
Switched to embedded debug symbols.
7.6.102 - 14 June 2018
Fixed a regression where calling ValidateAsync with RuleForEach would no longer execute tasks sequentially (#799).
7.6.101 - 13 June 2018
Added support for RuleForEach to the testing extensions (#238).
Fixed a regression where calling ValidateAsync with RuleForEach could cause a deadlock (#799).
Added ToString overrides on ValidationResult to generate a string representation of all errors (#778).
Updated logos thanks to Dylan Beattie (#780).
7.6.100 - 7 June 2018
Resolved an issue where ValidateAsync was called on child validators when the root validator was invoked synchronously.
7.6 - 1 June 2018
Fix WhenAsync not working properly when calling Validate instead of ValidateAsync
Upgrade ASP.NET Core integration to ASP.NET Core 2.1
Include rules now work with explicitly-selected properties.
Added caching when instantiating validators to obtain clientside metadata
7.5.2 - 16 March 2018
Support multiple rulesets on a rule.
Make setters on ValidationFailure's properties public to allow for easier deserialization.
Additional overload for OverridePropertyName that takes an expression.
Add overload of Include that lazily creates the inner validator.
Allow replacing the default Error Code resolution process
7.5.1 - 11 March 2018
Support CustomizeValidatorAttribute in WebApi integration
Resolved issues with referencing FluentValidation from legacy PCLs.
7.5 - 26 February 2018
Better handling of clientside messages when using custom overridden language resources
Flag in the ValidationContext's RootDataContext when a validator is invoked by the automatic MVC/WebApi integration
Improvements to some of the validation tester's messages
Added Transform method to transform property values prior to validation
Improve support for DisplayAttribute / DisplayNameAttribute when inferring property display name
Added Slovak language support
Added Hebrew language support
Added Brazilian Portuguese language support
Cache display names by default
Ensure ShouldHaveChildValidator test method works with model-level rules
Removed netstandard1.0 support. Supported platforms are now netstandard1.1, netstandard2.0 and net45.
7.4 - 27 January 2018
Update DependentRules syntax and mark old syntax as obsolete
Add workaround for inconsistent behaviour with HttpContext.Items with nonexistent keys in different version of AspNetCore
Updated ValidationException serialization support
Add ComparisonProperty to comparison validator message placeholders
The Test Helper now correctly handles read-only properties
Add CancellationToken support to ValidateAndThrowAsync and various ValidateAsync overloads
Introduce MessageBuilderContext to make custom MessageBuilders more useful
Update Microsoft.AspNetCore.Mvc dependency to 2.0.2
Update MVC5/WebApi2 AddToModelState extension not to overwrite existing attempted values
Add SetRulesetForClientsideMessages extension method for MVC5/AspNetCore
7.3.4 - 2 January 2018
Resolved issue in AspNetCore integration where the change made in 7.3.3 meant that child collections were incorrectly skipped for DataAnnotations-based validation, as well as FV
7.3.3 - 22 December 2017
Resolved issue in AspNetCore integration where child collections were incorrectly validated by the ModelValidatorProvider
7.3.2 - 21 December 2017
Added CancellationToken support to child validators
7.3 - 13 December 2017
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
Fixed overload of WithName that takes a lambda.
Updated version of the Czech translations
Added versions of WhenAsync and UnlessAsync that support CancellationTokens
Simplify calls to DependentRules
Add Skip property to CustomizeValidatorAttribute in the ASP.NET Core integration
Updated language translations for various error messages.
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 overridden
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 overridden 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 overridden 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 contributed by Daniel Dyson
* **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