public function validateSpeciesCode(ErrorElement $errorElement, $object)
    {
        $generator = $this->getConfigurationPool()->getContainer()->get('librinfo_varieties.code_generator.species');
        if (!$generator->validate($object->getCode())) {
            $errorElement
                ->with('code')
                    ->addViolation('Wrong species code format')
                ->end();
        }
    }