diff --git a/composer.json b/composer.json index ef466631..8bfd7420 100755 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "myparcelnl/sdk", - "version": "v1.2.3", + "version": "v1.2.4", "description": "This package is designed to send and receive data from MyParcel by means of an API.", "homepage": "https://www.myparcel.nl", "tags": ["MyParcel", "My Parcel", "Post NL", "PostNL"], diff --git a/src/Model/Repository/MyParcelConsignmentRepository.php b/src/Model/Repository/MyParcelConsignmentRepository.php index 78f98b25..9255576b 100755 --- a/src/Model/Repository/MyParcelConsignmentRepository.php +++ b/src/Model/Repository/MyParcelConsignmentRepository.php @@ -284,8 +284,23 @@ public function encodeReturnShipment(){ return $data; } + /** + * Check if address is correct + * Only for Dutch addresses + * + * @param $fullStreet + * @return bool + */ + public function isCorrectAddress($fullStreet) + { + $result = preg_match(self::SPLIT_STREET_REGEX, $fullStreet, $matches); + + return (bool)$result; + } + /** * Splits street data into separate parts for street name, house number and extension. + * Only for Dutch addresses * * @param string $fullStreet The full street name including all parts *