Open riley-pikus opened 1 year ago
Interesting. I haven't given this much thought previously. I guess it's up to @NoNameProvided to comment on this. Perhaps this is a matter of dev resources, and if community contributors are willing to do the work it will be accepted.
After looking into this a bit more, synchronous validators do run in bottom to top. Are you suggesting that async validators should run as though they were synchronous validators if there are synchronous validators on the same property?
Correct,
For example, If I want to validate that what the user sent me in their input is a "Valid ID in my other system", I'd like to decorate that property like so:
@IsValidIDInOtherSystem()
@IsUUID()
but you'll notice that in practice, non valid UUIDS make it to the decorator when I expected they shouldn't have
Could you rename this issue to feat: run asynchronous decorators in order when synchronous decorators are present on the same property
?
Description
This is a clone of issue 1688 as it should not be closed. Per my comment:
Let me know if you'd like me to copy/paste their description here rather than just linking to follow the normal Issue reporting pattern