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.

Set Options from outside / have a default RuleSet that always applies

See original GitHub issue

Is your feature request related to a problem? Please describe. Currently, it’s not possible to have a default RuleSet. It’s set internally to IncludeAllRuleSets. However, this is not desired behavior in some cases.

Describe the solution you’d like Please allow setting a default RuleSet for the Validator, i.e. directly in razor markup. <FluentValidationValidator @ref="_fluentValidationValidator" RuleSet="Name" DisableAssemblyScanning="true" />

Describe alternatives you’ve considered Alternatively, it should be possible to set the RuleSet by code through the options:

protected override void OnInitialized()
{
     _fluentValidationValidator.Validator.Options.RuleSet = "Name";
}

Currently, the options field is only internally and cannot be modified. This is really a limitation.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:21 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
papajacommented, Jan 18, 2022

I have altered the existing code base.

On Tue, Jan 18, 2022 at 1:52 PM jostFT @.***> wrote:

@papaja https://github.com/papaja did you alter the existing code base? or did you use a workaround? 😃 We are currently in need of this feature, that’s why I’m asking 😅

— Reply to this email directly, view it on GitHub https://github.com/Blazored/FluentValidation/issues/58#issuecomment-1015381607, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOJDEXSXPQOJYBL47J4HL3UWVPCRANCNFSM42O5KAKQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

2reactions
chrissaintycommented, Apr 19, 2021

I’m just thinking the current setting isn’t the default. That was my bad, I should have picked it up at PR review. Anyway, By changing over to the default its going to make life easier for the majority of people using the library going forward.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix modified default rules - Azure AD Connect
Modifying existing default rules to achieve a needed customization isn't supported. If you do so, it prevents updating these rules to the latest ......
Read more >
Work with Rules and Rule Sets - Skyhigh Security
Always — The rule set is always applied. If the following criteria is matched — The rule set is applied if the criteria...
Read more >
Cloudflare Ruleset Engine docs
A ruleset is an ordered set of rules that you can apply to traffic on ... The rules in a managed ruleset have...
Read more >
6 Rule Sets - Advanced Management Console
The Advanced Management Console enables administrators to create and distribute deployment rule sets, which provide control over the browser-based Java ...
Read more >
Rulesets
The Rulesets feature allows you to route events to an endpoint and create collections of event rules, which define sets of actions to...
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