/** * Checks if all required fields are filled. * Returns array of invalid fields or empty array if all fields are fine. * * @param oxBase $oObject Address fields with values. * * @return bool If any invalid field exist. */ public function validateFields($oObject) { $aRequiredFields = $this->getRequiredFields(); $oFieldValidator = $this->getFieldValidator(); $aInvalidFields = array(); foreach ($aRequiredFields as $sFieldName) { if (!$oFieldValidator->validateFieldValue($oObject->getFieldData($sFieldName))) { $aInvalidFields[] = $sFieldName; } } $this->_setInvalidFields($aInvalidFields); return empty($aInvalidFields); }