protected function validator($value)
    {
        $convertValue = $this->widgetToValue($value);

        if ((null === $convertValue) && $this->mandatory) {
            $translator = $this->getEnvironment()->getTranslator();

            $message = empty($this->label)
                ? $translator->translate('ERR.mdtryNoLabel')
                : \sprintf(
                    $translator->translate('ERR.mandatory'),
                    $this->strLabel
                );

            $this->addError($message);
        }

        return $convertValue;
    }