This repository has been archived by the owner on Jan 24, 2021. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The first commit turns the tests back on but they don't pass because the validation refactoring removed class level attribute support. The second commit tries to add this back in.
From what I know ASP.NET MVC adds class level errors to the results with an empty member name which is what I did here. This also required modifying the custom attribute in the tests to return a member name otherwise the tests still failed.
Another option is to modify the
OopsAdapter
and override theValidate
function like thisI think this is the better of the two options, I just don't like how the rest of the function is duplicated. I had to do this when implementing an adapter for the
CompareAttribute
so maybe this could be refactored a bit more to remove the duplication?I still need to make the change to handle display names as per #1469 but I was looking for feedback on these changes first.