Validiert die uebergebene Adresse auf moegliche Fehler.

@param ort        der Ort
@param strasse    die Strasse
@param hausnummer die Hausnummer
960341
public static void validate(Ort ort, String strasse, String hausnummer) {
        if (StringUtils.isBlank(strasse)) {
            throw new InvalidValueException(strasse, "street");
        }
        validate(ort, strasse, hausnummer, VALIDATOR);
    }
1316504
function isDepositDefinition(arrDefinition){
    if (!validationUtils.isArrayOfLength(arrDefinition, 2))
        return false;
    if (arrDefinition[0] !== 'or')
        return false;
    if (!validationUtils.isArrayOfLength(arrDefinition[1], 2))
        return false;
    if (!validationUtils.isArrayOfLength(arrDefinition[1][0], 2))
        return false;
    if (!validationUtils.isArrayOfLength(arrDefinition[1][1], 2))
        return false;
    if (arrDefinition[1][0][1] !== constants.FOUNDATION_SAFE_ADDRESS)
        return false;
    if(!validationUtils.isValidAddress(arrDefinition[1][1][1]))
        return false;
    
    return true;    
}
846240
public function validateOrderAddress(Mage_Sales_Model_Order $order)
    {
        /** @var Mage_Sales_Model_Order_Address $address */
        $address = $order->getShippingAddress();
        $countryModel = $address->getCountryModel();
        $result = $this->validate(
            $address->getStreet(),
            $address->getRegionCode(),
            $address->getCity(),
            $address->getPostcode(),
            $countryModel->getName()
        );

        if (!$result || !isset($result['ValidAustralianAddress'])) {
            $status = static::ADDRESS_UNKNOWN;
        } else if (isset($result['validAddress']) && $result['validAddress']) {
            $status = static::ADDRESS_VALID;
        } else {
            $status = static::ADDRESS_INVALID;
        }

        $order->setAddressValidated($status);

        return $result;
    }
82037
protected function define(OrmDefinition $orm)
    {
        $orm->valueObjects([
                EmailAddress::class => EmailAddressMapper::class,
                Html::class         => HtmlMapper::class,
                IpAddress::class    => IpAddressMapper::class,
                Url::class          => UrlMapper::class,
        ]);
    }
4430
public static ErrorCode isAddressValid(String address){
        if (!isMustFieldValid( address, ipRegEx)) {
            return ErrorCode.SERVICE_INSTANCE_ADDRESS_FORMAT_ERROR;
        }
        return ErrorCode.OK;
    }
1303203
public void setProperty(String strKey, Object objValue)
    {
        if (m_mapParams == null)
            m_mapParams = new HashMap<String,Object>();
        m_mapParams.put(strKey, objValue);
    }
177762
public static function isIPWanAddress($string) {
        $bytes = self::isIPAddress($string, true);

        // Die Logik entspricht dem Gegenteil von self:: isIPLanAdress() + zusaetzlicher Tests.
        if ($bytes) {
            if ($bytes[0] == 10)                   // 10.0.0.0 - 10.255.255.255
                return false;

            if ($bytes[0] == 127)                  // 127.0.0.0 - 127.255.255.255
                return false;

            if ($bytes[0]==169)                    // 169.0.0.0 - 169.255.255.255 !!! wem zugewiesen? niemandem?
                return false;

            if ($bytes[0] == 172)                  // 172.16.0.0 - 172.31.255.255
                return !(15 < $bytes[1] && $bytes[1] < 32);

            if ($bytes[0]==192)                    // 192.168.0.0 - 192.168.255.255
                return ($bytes[1]!=168);
        }

        // dieses TRUE ist eher spekulativ
        return true;
    }
361794
protected void validate(String operationType) throws Exception
	{
		super.validate(operationType);

		MPSString bay_number_validator = new MPSString();
		bay_number_validator.validate(operationType, bay_number, "\"bay_number\"");
		
		MPSString name_validator = new MPSString();
		name_validator.validate(operationType, name, "\"name\"");
		
		MPSDoubleLong utilized_validator = new MPSDoubleLong();
		utilized_validator.validate(operationType, utilized, "\"utilized\"");
		
		MPSDoubleLong size_validator = new MPSDoubleLong();
		size_validator.validate(operationType, size, "\"size\"");
		
		MPSString status_validator = new MPSString();
		status_validator.validate(operationType, status, "\"status\"");
		
		MPSIPAddress host_ip_address_validator = new MPSIPAddress();
		host_ip_address_validator.validate(operationType, host_ip_address, "\"host_ip_address\"");
		
		MPSString act_id_validator = new MPSString();
		act_id_validator.validate(operationType, act_id, "\"act_id\"");
		
	}
599805
@Override
  public final boolean isValid(final Object pvalue, final ConstraintValidatorContext pcontext) {
    if (pvalue == null) {
      return true;
    }
    try {
      String countryCode =
          BeanPropertyReaderUtil.getNullSaveStringProperty(pvalue, fieldCountryCode);
      final String postalCode =
          BeanPropertyReaderUtil.getNullSaveStringProperty(pvalue, fieldPostalCode);
      if (StringUtils.isEmpty(postalCode)) {
        return true;
      }

      if (allowLowerCaseCountryCode) {
        countryCode = StringUtils.upperCase(countryCode);
      }

      final String regExCheck = POSTAL_CODE_MAP.postalCodes().get(countryCode);
      if (regExCheck == null) {
        return true;
      }
      if (postalCode.matches(regExCheck)) {
        return true;
      }
      switchContext(pcontext);
      return false;
    } catch (final Exception ignore) {
      switchContext(pcontext);
      return false;
    }
  }
127060
public void annotateFieldJSR303(JMethod getter, boolean addValidAnnotation) {
		if (isRequired()) {
			getter.annotate(NotNull.class);
		}
		if (StringUtils.hasText(getPattern())) {
			JAnnotationUse annotation = getter.annotate(Pattern.class);
			annotation.param("regexp", getPattern());
		}
		if (getMinLength() != null || getMaxLength() != null) {
			JAnnotationUse annotation = getter.annotate(Size.class);

			if (getMinLength() != null) {
				annotation.param("min", getMinLength());
			}

			if (getMaxLength() != null) {
				annotation.param("max", getMaxLength());
			}
		}
		if (addValidAnnotation) {
			getter.annotate(Valid.class);
		}

		if (minimum != null) {
			JAnnotationUse annotation = getter.annotate(DecimalMin.class);
			annotation.param("value", String.valueOf(minimum));
		}

		if (maximum != null) {
			JAnnotationUse annotation = getter.annotate(DecimalMax.class);
			annotation.param("value", String.valueOf(maximum));
		}
	}
728749
public void validateOperation(final ModelNode operation) {
        if (operation == null) {
            return;
        }
        final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR));
        final String name = operation.get(OP).asString();

        OperationEntry entry = root.getOperationEntry(address, name);
        if (entry == null) {
            throwOrWarnAboutDescriptorProblem(ControllerLogger.ROOT_LOGGER.noOperationEntry(name, address));
        }
        //noinspection ConstantConditions
        if (entry.getType() == EntryType.PRIVATE || entry.getFlags().contains(OperationEntry.Flag.HIDDEN)) {
            return;
        }
        if (entry.getOperationHandler() == null) {
            throwOrWarnAboutDescriptorProblem(ControllerLogger.ROOT_LOGGER.noOperationHandler(name, address));
        }
        final DescriptionProvider provider = getDescriptionProvider(operation);
        final ModelNode description = provider.getModelDescription(null);

        final Map<String, ModelNode> describedProperties = getDescribedRequestProperties(operation, description);
        final Map<String, ModelNode> actualParams = getActualRequestProperties(operation);

        checkActualOperationParamsAreDescribed(operation, describedProperties, actualParams);
        checkAllRequiredPropertiesArePresent(description, operation, describedProperties, actualParams);
        checkParameterTypes(description, operation, describedProperties, actualParams);

        //TODO check ranges
    }
350687
private Address[] getAddresses(List<String> strAddresses, String delimiter) throws OrganizationException {
		Address[] addressArray = new Address[strAddresses.size()];
		int count = 0;
		for (String addr : strAddresses)
		{
            try{
            	addressArray[count] = new InternetAddress(addr);
            	count++;
            }catch(Exception e){
            	throw new OrganizationException("Failed to parse the email address "+ addr +": "+e.getMessage());
            }
        }
        return addressArray;
	}
133410
public static void validateAddress(String address) throws ServiceException {
        if (address == null || address.isEmpty()) {
            throw new ServiceException(
                    ErrorCode.SERVICE_INSTANCE_ADDRESS_FORMAT_ERROR);
        }
    }
321567
public void addDeref(ValueNumber vn, Location location) {
        if (UnconditionalValueDerefAnalysis.DEBUG) {
            System.out.println("Adding dereference of " + vn + " to # " + System.identityHashCode(this) + " @ " + location);
        }
        valueNumbersUnconditionallyDereferenced.set(vn.getNumber());

        Set<Location> derefLocationSet = getDerefLocationSet(vn);
        derefLocationSet.add(location);
    }
421610
void accept(PassedRoute passRoute) {
		//各行の通過情報を集計
		for (LineRange range : lineRanges) {
			if (passRoute.isHit(range)) {
				hitLines[range.getLineIndex()]++;
			}
		}
		//各行のブランチ情報を集計
		passRoute.getRangeBranchStatus().forEach((range, state) -> {
			RangeBranch branch = branches.computeIfAbsent(range, RangeBranch::new);
			branch.add(state);
		});

		//各通過情報を集計
		passRanges.addAll(passRoute.getHitRanges());

		updated = true;

	}
927036
protected function validate_street_address($field, $input, $param = null)
    {
        if (!isset($input[$field]) || empty($input[$field])) {
            return;
        }

        // Theory: 1 number, 1 or more spaces, 1 or more words
        $hasLetter = preg_match('/[a-zA-Z]/', $input[$field]);
        $hasDigit = preg_match('/\d/', $input[$field]);
        $hasSpace = preg_match('/\s/', $input[$field]);

        $passes = $hasLetter && $hasDigit && $hasSpace;

        if (!$passes) {
            return array(
                'field' => $field,
                'value' => $input[$field],
                'rule' => __FUNCTION__,
                'param' => $param,
            );
        }
    }
999803
public void setAddress(final String address) {
		if (this.address == null && address != null && address.contains("@")) {
			this.address = address;
		}
	}