Description
Nested() rule changes property displayed by following rules (sibling rules)
example rules:
'property1' => [
new Nested([
'property2' => ... // any rule
]),
new Required(
emptyCondition: fn() => true, // trigger for testing
),
]
error in the Required() rule will be "Property2 cannot be blank.", but it should be "Property1 cannot be blank.",
it could be any rule after Nested(),
if Callback() rule is used, $context inside callback will be:
$context->getProperty(); // 'property1' => right
$context->getPropertyLabel(); // 'property2' => wrong
$context->getTranslatedProperty(); // 'property2' => wrong
so, seems it is just label corrupted somewhere, not property name itself
Package version
No response
PHP version
No response
Description
Nested() rule changes property displayed by following rules (sibling rules)
example rules:
error in the
Required()rule will be"Property2 cannot be blank.", but it should be"Property1 cannot be blank.",it could be any rule after
Nested(),if
Callback()rule is used, $context inside callback will be:so, seems it is just label corrupted somewhere, not property name itself
Package version
No response
PHP version
No response