FluentValidation 2.0 RC 1 now available
FluentValidation 2.0 RC1 is now available for download.
The biggest change in this release is the addition of the WithLocalizedName method which supports localizing only the name portion of a validation message (previously, you would have to override the entire message if you wanted it to use custom resources).
Summary of changes since 2.0 beta 2:
- Updated MVC integration to work with MVC3 RC2
- Allow custom MVC ModelValidators to be added to the FluentValidationModelValidatorProvider
- Support using a resource provider for custom property validators through the new IResourceAccessorBuilder interface
- Added WithLocalizedName as a counterpart to WithLocalizedMessage
- Deprecated the WithPropertyName method as it was misleading. Depending on your scenario, you should either use WithName or OverridePropertyName instead.
- Renamed IErrorMessageSource and its derivatives to IStringSource (breaking change)
All changes since 1.3:
- Removed the v1.1 backwards compatibility layer. If you’re still using old-style custom validators (which were marked as Obsolete since v1.2), you will need to upgrade.
- Silverlight assembly renamed to FluentValidation.dll for consistency (formerly was FluentValidation.Silverlight.dll)
- Provide more useful information in ValidationException error message.
- Removed old mechanism for specifying cascade mode. Use .Cascade(cascadeMode) instead
- 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 (for collections that implement ICollection)
- Performance improvements to AttributedValidatorFactory
- 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.