source/Core/InputValidator.php
public function checkRequiredFields($user, $billingAddress, $deliveryAddress)
    {
        /** @var \OxidEsales\Eshop\Application\Model\RequiredAddressFields $requiredAddressFields */
        $requiredAddressFields = oxNew(\OxidEsales\Eshop\Application\Model\RequiredAddressFields::class);

        /** @var \OxidEsales\Eshop\Application\Model\RequiredFieldsValidator $fieldsValidator */
        $fieldsValidator = oxNew(\OxidEsales\Eshop\Application\Model\RequiredFieldsValidator::class);

        /** @var User $user */
        $user = oxNew(User::class);
        $billingAddress = $this->_setFields($user, $billingAddress);
        $fieldsValidator->setRequiredFields($requiredAddressFields->getBillingFields());
        $fieldsValidator->validateFields($billingAddress);
        $invalidFields = $fieldsValidator->getInvalidFields();

        if (!empty($deliveryAddress)) {
            /** @var \OxidEsales\Eshop\Application\Model\Address $deliveryAddress */
            $deliveryAddress = $this->_setFields(oxNew(\OxidEsales\Eshop\Application\Model\Address::class), $deliveryAddress);
            $fieldsValidator->setRequiredFields($requiredAddressFields->getDeliveryFields());
            $fieldsValidator->validateFields($deliveryAddress);
            $invalidFields = array_merge($invalidFields, $fieldsValidator->getInvalidFields());
        }

        foreach ($invalidFields as $sField) {
            $exception = oxNew(\OxidEsales\Eshop\Core\Exception\InputException::class);
            $exception->setMessage(\OxidEsales\Eshop\Core\Registry::getLang()->translateString('ERROR_MESSAGE_INPUT_NOTALLFIELDS'));

            $this->addValidationError($sField, $exception);
        }
    }
public function checkRequiredFields($user, $billingAddress, $deliveryAddress)
    {
        /** @var \OxidEsales\Eshop\Application\Model\RequiredAddressFields $requiredAddressFields */
        $requiredAddressFields = oxNew(\OxidEsales\Eshop\Application\Model\RequiredAddressFields::class);

        /** @var \OxidEsales\Eshop\Application\Model\RequiredFieldsValidator $fieldsValidator */
        $fieldsValidator = oxNew(\OxidEsales\Eshop\Application\Model\RequiredFieldsValidator::class);

        /** @var User $user */
        $user = oxNew(User::class);
        $billingAddress = $this->_setFields($user, $billingAddress);
        $fieldsValidator->setRequiredFields($requiredAddressFields->getBillingFields());
        $fieldsValidator->validateFields($billingAddress);
        $invalidFields = $fieldsValidator->getInvalidFields();

        if (!empty($deliveryAddress)) {
            /** @var \OxidEsales\Eshop\Application\Model\Address $deliveryAddress */
            $deliveryAddress = $this->_setFields(oxNew(\OxidEsales\Eshop\Application\Model\Address::class), $deliveryAddress);
            $fieldsValidator->setRequiredFields($requiredAddressFields->getDeliveryFields());
            $fieldsValidator->validateFields($deliveryAddress);
            $invalidFields = array_merge($invalidFields, $fieldsValidator->getInvalidFields());
        }

        foreach ($invalidFields as $sField) {
            $exception = oxNew(\OxidEsales\Eshop\Core\Exception\InputException::class);
            $exception->setMessage(\OxidEsales\Eshop\Core\Registry::getLang()->translateString('ERROR_MESSAGE_INPUT_NOTALLFIELDS'));

            $this->addValidationError($sField, $exception);
        }
    }
public function checkRequiredFields ( $ user , $ billingAddress , $ deliveryAddress ) { /** @var \OxidEsales\Eshop\Application\Model\RequiredAddressFields $requiredAddressFields */ $ requiredAddressFields = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ RequiredAddressFields :: class ) ; /** @var \OxidEsales\Eshop\Application\Model\RequiredFieldsValidator $fieldsValidator */ $ fieldsValidator = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ RequiredFieldsValidator :: class ) ; /** @var User $user */ $ user = oxNew ( User :: class ) ; $ billingAddress = $ this -> _setFields ( $ user , $ billingAddress ) ; $ fieldsValidator -> setRequiredFields ( $ requiredAddressFields -> getBillingFields ( ) ) ; $ fieldsValidator -> validateFields ( $ billingAddress ) ; $ invalidFields = $ fieldsValidator -> getInvalidFields ( ) ; if ( ! empty ( $ deliveryAddress ) ) { /** @var \OxidEsales\Eshop\Application\Model\Address $deliveryAddress */ $ deliveryAddress = $ this -> _setFields ( oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Address :: class ) , $ deliveryAddress ) ; $ fieldsValidator -> setRequiredFields ( $ requiredAddressFields -> getDeliveryFields ( ) ) ; $ fieldsValidator -> validateFields ( $ deliveryAddress ) ; $ invalidFields = array_merge ( $ invalidFields , $ fieldsValidator -> getInvalidFields ( ) ) ; } foreach ( $ invalidFields as $ sField ) { $ exception = oxNew ( \ OxidEsales \ Eshop \ Core \ Exception \ InputException :: class ) ; $ exception -> setMessage ( \ OxidEsales \ Eshop \ Core \ Registry :: getLang ( ) -> translateString ( 'ERROR_MESSAGE_INPUT_NOTALLFIELDS' ) ) ; $ this -> addValidationError ( $ sField , $ exception ) ; } }
Checking if all required fields were filled. In case of error
exception is thrown

@param User  $user            Active user.
@param array $billingAddress  Billing address.
@param array $deliveryAddress Delivery address.
Checking if all required fields were filled . In case of error exception is thrown