I know email addresses are limited to 254 characters, but is there a single resource that outlines suggested maxlengths for common fields like contact information e.g. phone, city, etc?
It seems every project I work people just shoot from the hip on their proposed limits. I'm hoping to find a canonical reference, targeted to a specific country.
Edit - Updated email maxlength per comment.
I just found that the HR-XML Consortium posted their standards. Perhaps there is something in their download that addresses things like this.
http://www.hr-xml.org/hr-xml/wms/hr-xml-1-org/index.php?id={E00DA03B685A0DD18FB6A08AF0923DE0|139|2}
-- Original -- I've run into this problem before, after starting on any new project. And my answer here is just based off experience. I don't think there is a canonical reference. If you already have existing data, you could run a report and see what the max length is for any of the fields and add some padding. If you are going to be getting data from more than one country, then the max length may change based on the country.
Even if there was a canonical list based on country, it wouldn't be enough, because there exists > 1 language and culture in most countries, each possibly having their own "normal" lengths for each of the fields you are talking about.
Some common sense we apply: we usually cut off the address fields at 50. Why? well, I can't imagine anyone having an address that has 50 characters on it (how could you possibly fit that onto an envelope).
For things like phone numbers, we break it out and give the country and city codes their own fields, as well as for area codes. Then we cap the phone numbers at 15. Again, I've never seen a phone number (with all of the other stuff left out) > 15.
For the same reason, if you break up the name fields into first name/last name, you probably don't need 50 chars, 35 might suffice.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With