question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pipeline-ruleset interaction

See original GitHub issue

System Details

  • FluentValidation version: 8.1.3
  • Web Framework version ASP.NET Core 2.2 + netstandard2.0

Issue Description

I’d like to do something like an IValidatorInterceptor, but I’d like it cross cutting for the entire ASP.NET Core project.

Specifically, rather than using CustomizeValidatorAttribute or implementing IValidatorInterceptor on my validating class, instead put something into the pipeline which enables or disables a particular ruleset when a PATCH verb is encountered.

Is there a way to do this?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
JeremySkinnercommented, Apr 4, 2019

I had to push out an 8.2.1 release with an unrelated fix, so I made the IValidatorInterceptor change while I was in there. You can now register a default IValidatorInterceptor with the container, and it’ll be used for all requests.

Thinking out loud, it might be cool to have more extensibility points within the ASP.NET Core area of your code, especially maybe some DI dependency. What do you think?

If you have some specific requests, please could you open separate issues for them? Thanks.

1reaction
JeremySkinnercommented, Apr 4, 2019

Hmm not as simple as that, as context.Selector is (reasonably) a read only property…

The usual approach is to create a new instance of the context, copying across what you need from the old one (and providing a new selector). This is how the internal validators handle this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Source code for streamsets.sdk.st_models
This class provides abstractions to make it easier to interact with a pipeline before it's imported into ST. Args: pipeline (:obj:`dict`): A Python...
Read more >
streamsets.sdk.sdc_models — SDK for Python
This class provides abstractions to make it easier to interact with a pipeline before it's imported into SDC. Args: pipeline (:obj:`dict`): A Python...
Read more >
TurboEngines
interaction costs and the quote turnaround time, specifically during peak load or large transactions. ... Manage Price Pipeline Ruleset.
Read more >
Drug interactions due to cytochrome P450 - PMC
Drug metabolism via the cytochrome P450 system has emerged as an important determinant in the occurrence of several drug-drug interactions. A greater degree...
Read more >
SlackAttachment.fallback - Java
private SlackAttachment slackAttachment(PipelineRule rule, GoNotificationMessage message, PipelineStatus pipelineStatus) throws URISyntaxException { String ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found