Option to provide RootContextData#156
Conversation
|
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 |
|
+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? |
|
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. |
|
@chrissainty Can you take a closer look into this if you have available time? |
|
My codebase would also benefit from this feature |
⏰ Stale Pull RequestNo activity for 1 year. Will close in 45 days unless updated. |
FluentValidationallows developer to provide additional data for validation which can be utilized when defining validation rules. UnfortunatelyFluentValidationValidatorcomponent does not provide such an option to do so (parameter binding).This PR adds a new property/parameter
ContextDatawhich can be used to bindDictionarywith additional data which will be provided to the validation pipeline.Examples were modified accordingly to showcase the new option.