-
Notifications
You must be signed in to change notification settings - Fork 0
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
[CRO-29] Add more country info #2
Conversation
/* | ||
* Return a list of country names | ||
*/ | ||
export function getCountries(): string[] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to change the function name, but this will result in breaking changes. So I have left it is as is.
I'm just wondering if the reason this lib has no recent commits is because discovery service has moved to using https://www.npmjs.com/package/countries-list and https://github.com/lux-group/svc-discovery/blob/master/package.json#L18 Would it be good if this data was surfaced for everyone through |
It appears there is some overlap. Especially with the country names data.
The only "new" data I've added is the If we were to move it, I think it would make more sense to have it in the
For the rest of the data. Perhaps this is something that can be done on ENGX? |
This lib is also a public one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This lib is also a public one.
I wasn't able to find a library that had this sizeOfNSN data (that wasn't enormous), so it might also be useful to others who want country data and some light phone number validation.
Yeah, seems lib-countries
doesn't have the sizeOfNSN
you need, also I think it's not worthy to make request to svc-calendar for enquiry mobile number format, I'd rather to have it set in this lib
Just out of curious, where do you get the sizeOfNSN
data from?
I was able to get most of this info from Wikipedia (I think it is a good source).
For the countries that didn't have
|
https://aussiecommerce.atlassian.net/browse/CRO-25
For CRO-25, we want to be able to do some basic front-end validation on phone numbers.
True validation of phone numbers is very complex (see libphonenumber), sowe'll simply be checking the number of digits
We've confirmed this is how Expedia does it. "As long as it looks like a number, it is good".
I intend for this lib to be used in
svc-traveller
when generating the details form.We should be able to remove the
country-telephone-data
lib from the customer portal once all these changes are done.Other Misc changes:
The existing interface has not changed, so there are no breaking changes client side.