source/Core/CompanyVatInValidator.php
public function validate(\OxidEsales\Eshop\Application\Model\CompanyVatIn $companyVatNumber)
    {
        $result = false;
        $validators = $this->getCheckers();

        foreach ($validators as $validator) {
            $result = true;
            if ($validator instanceof \OxidEsales\Eshop\Core\Contract\ICountryAware) {
                $validator->setCountry($this->getCountry());
            }

            if (!$validator->validate($companyVatNumber)) {
                $result = false;
                $this->setError($validator->getError());
                break;
            }
        }

        return $result;
    }
public function validate(\OxidEsales\Eshop\Application\Model\CompanyVatIn $companyVatNumber)
    {
        $result = false;
        $validators = $this->getCheckers();

        foreach ($validators as $validator) {
            $result = true;
            if ($validator instanceof \OxidEsales\Eshop\Core\Contract\ICountryAware) {
                $validator->setCountry($this->getCountry());
            }

            if (!$validator->validate($companyVatNumber)) {
                $result = false;
                $this->setError($validator->getError());
                break;
            }
        }

        return $result;
    }
public function validate ( \ OxidEsales \ Eshop \ Application \ Model \ CompanyVatIn $ companyVatNumber ) { $ result = false ; $ validators = $ this -> getCheckers ( ) ; foreach ( $ validators as $ validator ) { $ result = true ; if ( $ validator instanceof \ OxidEsales \ Eshop \ Core \ Contract \ ICountryAware ) { $ validator -> setCountry ( $ this -> getCountry ( ) ) ; } if ( ! $ validator -> validate ( $ companyVatNumber ) ) { $ result = false ; $ this -> setError ( $ validator -> getError ( ) ) ; break ; } } return $ result ; }
Validate company VAT identification number.

@param \OxidEsales\Eshop\Application\Model\CompanyVatIn $companyVatNumber

@return bool
Validate company VAT identification number .