You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The AddFluentValidation method currently enables both auto-validation and clientside integration. This method is being deprecated in favour of two replacements to allow finer control of which features are enabled:
AddFluentValidationAutoValidation
AddFluentValidationClientsideAdapters
Migration
If you were previously calling any of the following methods:
If you were previously using one of the service registration methods as part of your call to AddFluentValidation then you will need to call the corresponding AddValidators… method too:
// Before services.AddFluentValidation(options =>{options.RegisterValidatorsFromAssemblyContaining<MyValidator>();});// After migration:services.AddFluentValidationAutoValidation();services.AddFluentValidationClientsideAdapters();services.AddValidatorsFromAssemblyContaining<MyValidator>();
If you were previously disabling either auto-validation or clientside validation, now you should just remove the feature you no longer need.
Background
The
AddFluentValidation
method currently enables both auto-validation and clientside integration. This method is being deprecated in favour of two replacements to allow finer control of which features are enabled:AddFluentValidationAutoValidation
AddFluentValidationClientsideAdapters
Migration
If you were previously calling any of the following methods:
services.AddMvc().AddFluentValidation()
services.AddMvcCore().AddFluentValidation()
services.AddFluentValidation()
...you should now instead call:
If you were previously using one of the service registration methods as part of your call to
AddFluentValidation
then you will need to call the correspondingAddValidators…
method too:If you were previously disabling either auto-validation or clientside validation, now you should just remove the feature you no longer need.
The text was updated successfully, but these errors were encountered: