Unit Testing a custom TagHelper - how to populate the 'For.Metadata.ValidatorMetadata' list for the ModelExpression #29228
Unanswered
ciarancolgan
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I asked this question on Stack Overflow and also tried awarding a bounty for it, but still got no replies. I'm hoping adding here will give it extra visibility:
https://stackoverflow.com/questions/65239861/unit-testing-a-custom-taghelper-where-html-conditionally-rendered-based-on-the-p
Summary:
I have a custom TagHelper which extends the OOTB InputTagHelper. I am conditionally adding attributes to it based on the presence of a custom ValidationAttribute on the model property associated with it.
I'd like some guidance on how to be able to programatically populate the For.Metadata.ValidatorMetadata list for this ModelExpression in order to write a Unit Test for it.
Many thanks,
Ciaran
Beta Was this translation helpful? Give feedback.
All reactions