-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Pass array of RuleSets to Options from component parameter #225
Comments
Maybe I've figured out something about how the RuleSets are supposed to be setup. Does it make sense that I have to put the RuleSet in both the parent validator CustomerProfileValidator, and the child validators for the above code to work? I've found that I get very strange behavior if I don't put the rule in both the parent and child validators. On the screen the form fields when entering an incorrect value will blip a red outline around the text box for a split second and then validation returns true instead of false.
|
I've created the linked repo as an example. I am trying to recreate the issue and at this point I've not be able to repro it. I am now seeing a different issue related to RuleSets in that the RuleSets are not being enforced. In the current state of the code the Email validationshould be ignored and only the Customer validation should be running but it's not. I don't understand why RuleSets are behaving so strangely. https://github.com/mohaaron/BlazoredCollectionValidation
I expected the Email input to be ignored completely given the RuleSet is using only "Customer". |
Describe the bug
In my form component where I'm using FluentValidationValidator I have a parameter that I'm using to apply the RuleSets that I want to use for the for validation. This is not working for some reason.
I can only get the RuleSet correctly applied by passing a static string array as follows.
<FluentValidationValidator Options="@(options => options.IncludeRuleSets("Rule1", "Rule2"))" />
Expected behavior
Passing a Parameter array to the IncludeRuleSets method correctly applies the rules.
Hosting Model (is this issue happening with a certain hosting model?):
Here is the complete code that I'm trying to make work that is wrapping a TelerikForm so that I can reuse it across many forms.
The text was updated successfully, but these errors were encountered: