Asp.Net Core: NullReferenceException in FluentValidationClientModelValidatorProvider.CreateValidators(ClientValidatorProviderContext context)
See original GitHub issueHi!
In FluentValidationClientModelValidatorProvider.cs lines 40-41 you have the following code:
var validator = _validatorFactory.GetValidator(modelType); var descriptor = validator.CreateDescriptor();
This works fine if you have validator for modelType but what if some models are validated not by FluentValidation but some other validator? ASP.NET MVC allows to have multiple validator implementations in one app.
Unfortunately I can’t open solution to make necessary changes and create pull request by myself. I would be appreciated if somebody could find a few minutes to fix this issue and publish new Nuget packages.
Thank you!
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:10 (6 by maintainers)
Top Results From Across the Web
NullReferenceException when using Fluent Validation ASP ...
whenever I hook up fluent validation to my asp.net core mvc app I ... CreateValidators(ClientValidatorProviderContext context) Microsoft.
Read more >NullReferenceException in 7.2.0 · Issue #585
Hi, I'm running FV 7.20 in a new ASP.NET ... CreateValidators(ClientValidatorProviderContext context) error. ... GetResult() AspNetCore.
Read more >System.NullReferenceException while trying to load a view
I am trying to load DataMgmt.cshtml view by clicking on a link from my _Layout page but the page which should be loaded...
Read more >System.NullReferenceException: Object reference not set ...
NullReferenceException means that you are trying to use a reference variable whose value is Nothing/null . When the value is Nothing/null for the...
Read more >What is NullReferenceException in C#? - Code Maze
In C#, a NullReferenceException occurs when we try to access a variable whose value has not been set or has been set to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Aiming for a fix to be out today.
@ruslankiskinov Please open a separate issue providing a full stack trace - thanks.