We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c2f5fce commit 205f9ebCopy full SHA for 205f9eb
1 file changed
src/ViolationFactory.php
@@ -40,12 +40,17 @@ public function fromViolationParent(
40
ConstraintViolationInterface $violation,
41
string $parentPropertyPath
42
): ConstraintViolationInterface {
43
+ $propertyPath = $parentPropertyPath;
44
+ if ('' !== trim($violation->getPropertyPath())) {
45
+ $propertyPath .= $violation->getPropertyPath();
46
+ }
47
+
48
return new ConstraintViolation(
49
$violation->getMessage(),
50
$violation->getMessageTemplate(),
51
$violation->getParameters(),
52
$violation->getRoot(),
- $parentPropertyPath . '.' . $violation->getPropertyPath(),
53
+ $propertyPath,
54
$violation->getInvalidValue()
55
);
56
}
0 commit comments