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

Validator for passport numbers #1218

Closed
dani2819 opened this issue Dec 16, 2019 · 5 comments
Closed

Validator for passport numbers #1218

dani2819 opened this issue Dec 16, 2019 · 5 comments

Comments

@dani2819
Copy link
Contributor

How about validating passport numbers? The passport numbers vary from country to country so the functions should be like isValidPassport(string, countryCode).

@rubiin
Copy link
Member

rubiin commented Dec 29, 2019

Looks like a legit feature

@hamzahejja
Copy link
Contributor

hamzahejja commented Feb 6, 2020

@tux-tn @profnandaa
Do you think this is legit feature to implement? I'm willing to dig into it and provide an implementation, just found a good reference from Microsoft for EU Passport Formats: EU Passport Number
, I'm sure similar formats/regex could be set-up for non-EU countries' Passport Number as well, What's your call here? Should we move along?

the validator is most likely to be something like: isPassportNumber(str, countryCode)

@profnandaa
Copy link
Member

@hamzahejja -- this looks good to me, sure, you can go ahead 👍

@AubreyHewes
Copy link

AubreyHewes commented Feb 15, 2020

@hamzahejja there is a international standard(sic), that could be tested.. also *CH and US has own standard).. none adhere to published "standards" maybe EU more than most.

If it stays a regexp I have no problem; if it entails downloading lists(dbs) to check against... well no.. that is the developers prerogative..

Copying definitions same

@profnandaa
Copy link
Member

@AubreyHewes -- I think Hamza was working on a regex.

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

No branches or pull requests

5 participants