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.

ValidateField doesn't use RuleSet

See original GitHub issue

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));

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

danielscatigno-ncpccommented, Apr 27, 2022

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

chrissaintycommented, Jun 1, 2022

@danielscatigno-ncpc This has been raised in #58 and has now been added.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Set Options from outside / have a default RuleSet that ...
I've just tried this and it appears to work when clicking the submit button. However, if the validator is run on a specific...
Read more >
rule validation not triggered on input field when value is ...
Short answer: You need to add a validateFields to your antd FormInstance. E.g.: this.formRef.current.validateFields(). Long answer:.
Read more >
Client Script Validate Field Function - validateField
The purpose of the validateField client script function is to control what you can and can't enter in a certain field.
Read more >
Validate field value against another with arrays
Validate field value against another with arrays. I am using the following in the rules array of Requester but it doesn't work, any...
Read more >
How to use Business Rules to Validate Field Value Format ...
This article describes how to use Business Rules in Recruiting to validate if a field value has been entered in the correct format,...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found