Respect\Validation\Exceptions\NestedValidationException::findRelated PHP Method

findRelated() public method

public findRelated ( $path ) : Exception
return Exception
    public function findRelated($path)
    {
        $target = $this;
        $pieces = explode('.', $path);
        while (!empty($pieces) && $target) {
            $piece = array_shift($pieces);
            $target = $target->getRelatedByName($piece);
        }
        return $target;
    }