Skip to content
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

Option to provide RootContextData #156

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MichalCadecky
Copy link

FluentValidation allows developer to provide additional data for validation which can be utilized when defining validation rules. Unfortunately FluentValidationValidator component does not provide such an option to do so (parameter binding).

This PR adds a new property/parameter ContextData which can be used to bind Dictionary with additional data which will be provided to the validation pipeline.

Examples were modified accordingly to showcase the new option.

@ThaRaven403
Copy link

Just wanted to say that I was about to open an issue about this particular need. Although it's not used very often, it would be incredibly useful for things like checking for a duplicate name against an already existing list of items

@andrewjw1995
Copy link

+1, that's our exact use - checking for a duplicate name against an already existing list of items. @chrissainty could we please get a review on this?

@devraulu
Copy link

devraulu commented Nov 1, 2023

I was about to open an issue requesting this functionality or adding it myself, I hope it's added soon because I've been breaking my head for hours trying to get it to work with other libraries.

@Sharaf-Mansour
Copy link

@chrissainty Can you take a closer look into this if you have available time?

@pianomanjh
Copy link

My codebase would also benefit from this feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants