Skip to content

Postalcode is limited to 8 characters instead of suggested 40 in your class #30

Description

@stijnster

Hi Tijs,

Could you please check and verify that the maximum amount of characters for postalcodes is 8, instead of the 40 that you check on in your class;

tijsverkoyen/bpost/Bpost/Order/Address.php

public function setPostalCode($postalCode) { $length = 40; if (mb_strlen($postalCode) > $length) { throw new Exception(sprintf('Invalid length, maximum is %1$s.', $length)); } $this->postalCode = $postalCode; }

We received this error when we passed in a value, longer then 8.

TijsVerkoyen\Bpost\Exception: Uncaught exception 'TijsVerkoyen\Bpost\Exception' with message 'Error in request: cvc-maxLength-valid: Value '123456789012' with length = '12' is not facet-valid with respect to maxLength '8' for type 'PostalCodeType'.

Thanks for your work on this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions