Description
Current scope's dataset is not set in context inside StopOnError():
'property' => [
new Callback(
function (mixed $value, Callback $rule, ValidationContext $context): Result {
$context->getDataSet()->getData(); // <= dataset array
}
),
new StopOnError([
new Callback(
function (mixed $value, Callback $rule, ValidationContext $context): Result {
$context->getDataSet()->getData(); // <= null (bug)
}
),
]),
]
this could be worked around using $context->getGlobalDataSet() and extracting data from there,
but it would be not possible in case if multiple nested Each() used, because in context parameters there is index for the last Each() only
Package version
No response
PHP version
No response
Description
Current scope's dataset is not set in context inside StopOnError():
this could be worked around using
$context->getGlobalDataSet()and extracting data from there,but it would be not possible in case if multiple nested
Each()used, because in context parameters there is index for the lastEach()onlyPackage version
No response
PHP version
No response