FluentValidation
FluentValidation copied to clipboard
ValidateField doesn't use RuleSet
Is your feature request related to a problem? Please describe.
The ValidateField method doesn't consider RuleSets.
It generates errors for all RuleSets. Instead, I only like to have errors for one particalur RuleSet.
Describe the solution you'd like
I think you could combine functionality of RulesetValidatorSelector and MemberNameValidatorSelector to achieve this. Currently, there is only MemberNameValidatorSelector when creating the context:
var context = new ValidationContext<object>(fieldIdentifier.Model, new PropertyChain(), new MemberNameValidatorSelector(properties));
It would be a great Idea if we could pass the RuleSet to the component
<FluentValidationValidator/>
We can specify the validator, but it makes more sense if we could specify the RuleSet
@danielscatigno-ncpc This has been raised in #58 and has now been added.
@danielscatigno-ncpc This has been raised in #58 and has now been added.
That's awesome news!
@chrissainty Should not #58 Closes this one ?
Yes, I think you're right.