source/Application/Model/RequiredFieldsValidator.php
public function validateFields($oObject)
    {
        $aRequiredFields = $this->getRequiredFields();
        $oFieldValidator = $this->getFieldValidator();

        $aInvalidFields = [];
        foreach ($aRequiredFields as $sFieldName) {
            if (!$oFieldValidator->validateFieldValue($oObject->getFieldData($sFieldName))) {
                $aInvalidFields[] = $sFieldName;
            }
        }
        $this->_setInvalidFields($aInvalidFields);

        return empty($aInvalidFields);
    }
public function validateFields($oObject)
    {
        $aRequiredFields = $this->getRequiredFields();
        $oFieldValidator = $this->getFieldValidator();

        $aInvalidFields = [];
        foreach ($aRequiredFields as $sFieldName) {
            if (!$oFieldValidator->validateFieldValue($oObject->getFieldData($sFieldName))) {
                $aInvalidFields[] = $sFieldName;
            }
        }
        $this->_setInvalidFields($aInvalidFields);

        return empty($aInvalidFields);
    }
public function validateFields ( $ oObject ) { $ aRequiredFields = $ this -> getRequiredFields ( ) ; $ oFieldValidator = $ this -> getFieldValidator ( ) ; $ aInvalidFields = [ ] ; foreach ( $ aRequiredFields as $ sFieldName ) { if ( ! $ oFieldValidator -> validateFieldValue ( $ oObject -> getFieldData ( $ sFieldName ) ) ) { $ aInvalidFields [ ] = $ sFieldName ; } } $ this -> _setInvalidFields ( $ aInvalidFields ) ; return empty ( $ aInvalidFields ) ; }
Checks if all required fields are filled.
Returns array of invalid fields or empty array if all fields are fine.

@param \OxidEsales\Eshop\Core\Model\BaseModel $oObject Address fields with values.

@return bool If any invalid field exist.
Checks if all required fields are filled . Returns array of invalid fields or empty array if all fields are fine .