private function validateType(array $types): bool
    {
        $value = $this->value;
        $length = \strlen($value);
        $foundPrefix = false;
        $foundLength = false;
        foreach ($types as $type) {
            foreach ($this->validationData[$type]['prefixes'] as $prefix) {
                if (\substr($value, 0, \strlen($prefix)) == $prefix) {
                    $foundPrefix = true;
                    if (\in_array($length, $this->validationData[$type]['length'])) {
                        $foundLength = true;
                        break 2;
                    }
                }
            }
        }
        if (!$foundPrefix) {
            $this->setError(self::VALIDATOR_ERROR_CREDIT_CARD_NUMBER_PREFIX_NOT_MATCH);
        }
        if (!$foundLength) {
            $this->setError(self::VALIDATOR_ERROR_CREDIT_CARD_NUMBER_LENGTH_NOT_MATCH);
        }
        return $foundPrefix === true && $foundLength === true;
    }