yiisoft / validator

Yii validator library
https://www.yiiframework.com/
BSD 3-Clause "New" or "Revised" License
112 stars 39 forks source link

Pass $index to Callback for Each validator #615

Closed olegbaturin closed 8 months ago

olegbaturin commented 1 year ago

What steps will reproduce the problem?

new Each([
    new Сallback(function($value){}),
]);

What is the expected result?

element index in the callback function signature function($value, $index){}

vjik commented 1 year ago

It's can be implemented via parameter of context.

vjik commented 8 months ago

Done by #647