// than the root element, map it to the innermost directly
// mapped form of the violation path
// e.g. "children[foo].children[bar].data.baz"
// Here the innermost directly mapped child is "bar"
$scope =
$form;
$it =
new ViolationPathIterator($violationPath);
// Note: acceptsErrors() will always return true for forms inheriting
// their parent data, because these forms can never be non-synchronized
// (they don't do any data transformation on their own)
while ($this->
acceptsErrors($scope) &&
$it->
valid() &&
$it->
mapsForm()) { if (!
$scope->
has($it->
current())) { // Break if we find a reference to a non-existing child
break;
} $scope =
$scope->
get($it->
current());
$it->
next();
} } // Follow dot rules until we have the final target