class-validator
class-validator copied to clipboard
fix: support `each` with custom decorators
Custom decorators don't accept the each option. They should.
Note: Changes should be reverted made in #197 after we fixed this.
Created from #197.
Actually it does work with the validate function, the value passed into it is the correct array element.
What does not work is the "$value" reference in error messages and the value reference in the ValidationArguments is also not correct.
So you can only get the forEach value within the validate function when you use the first function argument, you will have to ignore the value in the ValidationArguments (second function argument).