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

xero-python's string length validation is not consistent with Xero #70

Open
DamianHeard opened this issue Dec 1, 2021 · 3 comments
Open
Assignees

Comments

@DamianHeard
Copy link

xero-python does client side string length validation. This validation is inconsistent with the length Xero supports.

We have found an example where we are running into this ValueError when retrieving data directly from Xero. The Contact name in question has length 263. This would seem to imply that the xero API actually supports names with length greater than 256.

@jarekwg
Copy link

jarekwg commented Jan 6, 2022

+1
This is validating data coming out of Xero, making it hard for us as developers to deal with it without implementing monkeypatches for xero-python, or telling our customers to clean up their data..

I'd propose relaxing this validation for data coming out of Xero, or aggressively updating all contacts in Xero to conform to this limit..

@RettBehrens
Copy link
Contributor

Confirmed.

These limits were translated over from the available API documentation at the time though it seems Xero is not restricting the character length for contact name.

This will need to be addressed at the Xero-OpenAPI yaml spec level as it currently affects all SDKs

@RettBehrens RettBehrens self-assigned this Feb 22, 2022
@jarekwg
Copy link

jarekwg commented Jun 7, 2023

Hi @RettBehrens, was this addressed in the end? Every now and against we're still seeing errors like:

ValueError - Invalid value for name, length must be less than or equal to 255.

Which we can do nothing about because all we're doing is retrieving customer data. To date we've just been reaching out to the customer and asking them to reduce the name length, but it's a painful process..

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

3 participants