Closed hiscaler closed 1 month ago
new StopOnError([ new Required(), static function (mixed $value, Callback $rule, ValidationContext $context) { $id = $context->getDataSet()->getAttributeValue('product_id'); // $id is null } ])
can't get product_id value
Get product_id value
Remove StopOnError
In this case scope will be property value that validated by StopOnError. Use $context->getGlobalDataSet() to access all data.
StopOnError
$context->getGlobalDataSet()
What steps will reproduce the problem?
can't get product_id value
What is the expected result?
Get product_id value
What do you get instead?
Remove StopOnError