Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
stijnster opened this issue Jan 15, 2018 · 0 comments

Comments

@stijnster
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant