Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

DataAnnotationsClientModelValidatorProvider not always using IValidationAttributeAdapterProvider #5009

Closed
Muchiachio opened this issue Jul 12, 2016 · 5 comments
Assignees

Comments

@Muchiachio
Copy link
Contributor

Muchiachio commented Jul 12, 2016

I was trying to localize my app, but I found out that my IValidationAttributeAdapterProvider doesn't get called then a value type is assigned [Required] attribute by default. I think the problem lies here. It's always using default required adapter implementation.

Workaround is to add [Required] attribute on value types.

@danroth27
Copy link
Member

@dougbu Thoughts on this?

@dougbu
Copy link
Member

dougbu commented Jul 13, 2016

@danroth27 the class in question already has the IValidationAttributeAdapterProvider. Fix is just a matter of using it.

@dougbu dougbu removed their assignment Jul 13, 2016
@dougbu
Copy link
Member

dougbu commented Jul 13, 2016

Cleared Investigate label and assignee since investigation is done.

@rynowak rynowak added this to the 1.1.0 milestone Jul 13, 2016
@dougbu
Copy link
Member

dougbu commented Jul 13, 2016

Much appreciated @rynowak

dougbu added a commit that referenced this issue Jul 18, 2016
- #5009
- don't create a `RequiredAttributeAdapter` directly
dougbu added a commit that referenced this issue Jul 19, 2016
- #5009
- don't create a `RequiredAttributeAdapter` directly
@dougbu
Copy link
Member

dougbu commented Jul 19, 2016

35cc5b6

@dougbu dougbu closed this as completed Jul 19, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants