Set Options from outside / have a default RuleSet that always applies
See original GitHub issueIs 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:
- Created 2 years ago
- Comments:21 (4 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have altered the existing code base.
On Tue, Jan 18, 2022 at 1:52 PM jostFT @.***> wrote:
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.