Closed pranavkm closed 5 years ago
cc @dougbu. This may tie in to https://github.com/aspnet/Mvc/issues/8730
cc @JeremySkinner
I need some way to explicitly identify required rules (for the purpose of being able to remove implicitly-added required validators that double up with what FluentValidation is doing) which is why I'm using RequiredAttributeAdapter
here.
If this becomes internal, would I be able to use IValidationAttributeAdapterProvider
to achieve the same thing? If needbe I can still check the type by looking for AttributeAdapterBase<RequiredAttribute>
(or even reflection), although it would be nice not to have to make changes like this unless really needed. What's the reason for wanting to make this internal?
What's the reason for wanting to make this internal?
We made all of our pubternal types internal
in 3.0. See https://github.com/aspnet/Mvc/issues/8689. I tried building your repo and there's a few usings
that need to be cleaned up, but outside of RequiredAttributeAdapter
everything just worked. Making the type public sounds like the least problematic thing to do here.
FluentValidation uses the type: https://github.com/JeremySkinner/FluentValidation/blob/master/src/FluentValidation.AspNetCore/FluentValidationClientModelValidatorProvider.cs#L113. An alternative might be to consider changing FluentValidation to use
IValidationAttributeAdapterProvider