protected function getPropertyPathAsArray(ConstraintViolationInterface $violation)
    {
        $path = $violation->getPropertyPath();

        // Remove outer brackets and explode fields into array
        $path = substr($path, 1, strlen($path) - 2);

        return explode('][', $path);
    }