// This case happens if an error happened in the data under a
// form inheriting its parent data that does not match any of the
// children of that form.
if (null !==
$violationPath && !
$match) { // If we could not map the error to anything more specific
// 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());