Closed VladislavBI closed 1 month ago
IMHO you shouldn't be using Validators for business validation, that should be separate and the validator should be for empty fields etc.
Apologies the WithEmptyValidators
is not obvious but that's what it's there for so your solution is the correct one.
In my code I have some Abstract validators, For some of them use my inject db context. Because this context is scoped and carter register validators as a singleton I receive an exception. I have found a solution , but can you please exclude this behavior by default, because it is not obvious