How to validate a passport? [closed]Validate decimal numbers in JavaScript - IsNumeric()How to validate an email address in JavaScript?A comprehensive regex for phone number validation(Built-in) way in JavaScript to check if a string is a valid numberHow to validate an email address using a regular expression?Struts2 Validation at the action vs domain object levelHow does the SQL injection from the “Bobby Tables” XKCD comic work?What is the maximum length of a valid email address?i18n ValidationsHow to validate identity document numbers (passport, id card)?

Math PhD in US vs Master + PhD in Europe

How do I find and plot the intersection of these three surfaces?

Do 3D printers really reach 50 micron (0.050mm) accuracy?

Zombie diet, why humans?

What speedlites can work with the Canon EOS 4000D's non-standard hotshoe?

Procedurally generate regions on island

For people who believe in Jesus and not the devil, what happend in the desert?

Spicket or spigot?

When is it ok to add filler to a story?

ArcGIS Intersect Tool not splitting lines as expected?

Why is Madam Hooch not a professor?

How would a order of Monks that renounce their names communicate effectively?

Children's short story about material that accelerates away from gravity

Why do I have to press the shutter button twice on my Canon 6d Mark II?

Why does the numerical solution of an ODE move away from an unstable equilibrium?

Wilcoxon signed rank test – critical value for n>50

How to assign a Python list to a vim variable and escape its strings correctly

Golf the smallest circle!

“Faire” being used to mean “avoir l’air”?

Is なきにしもあらず~なきに a set phrase?

Set vertical spacing between two particular items

What shortcut does ⌦ symbol in Camunda macOS app indicate and how to invoke it?

Why isn’t the tax system continuous rather than bracketed?

Analog is Obtuse!



How to validate a passport? [closed]


Validate decimal numbers in JavaScript - IsNumeric()How to validate an email address in JavaScript?A comprehensive regex for phone number validation(Built-in) way in JavaScript to check if a string is a valid numberHow to validate an email address using a regular expression?Struts2 Validation at the action vs domain object levelHow does the SQL injection from the “Bobby Tables” XKCD comic work?What is the maximum length of a valid email address?i18n ValidationsHow to validate identity document numbers (passport, id card)?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








26















Well I have been asked to validate passport numbers (the documents used on airports to travel to other countries).



My question is: What format are these "numbers"? All I know is that they can have letters but I am not finding any place defining the rules. Any pointers/Links?










share|improve this question















closed as off-topic by Machavity, Pearly Spencer, Madhur Bhaiya, Jim Garrison, jww Nov 3 '18 at 17:59


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Machavity, Pearly Spencer, Madhur Bhaiya, Jim Garrison, jww
If this question can be reworded to fit the rules in the help center, please edit the question.











  • 1





    I guess the rules a different for different countries.

    – Andrey Adamovich
    Nov 4 '09 at 14:11











  • Sorry for the VTC. +1 for asking the question.

    – jww
    Nov 3 '18 at 18:00

















26















Well I have been asked to validate passport numbers (the documents used on airports to travel to other countries).



My question is: What format are these "numbers"? All I know is that they can have letters but I am not finding any place defining the rules. Any pointers/Links?










share|improve this question















closed as off-topic by Machavity, Pearly Spencer, Madhur Bhaiya, Jim Garrison, jww Nov 3 '18 at 17:59


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Machavity, Pearly Spencer, Madhur Bhaiya, Jim Garrison, jww
If this question can be reworded to fit the rules in the help center, please edit the question.











  • 1





    I guess the rules a different for different countries.

    – Andrey Adamovich
    Nov 4 '09 at 14:11











  • Sorry for the VTC. +1 for asking the question.

    – jww
    Nov 3 '18 at 18:00













26












26








26


5






Well I have been asked to validate passport numbers (the documents used on airports to travel to other countries).



My question is: What format are these "numbers"? All I know is that they can have letters but I am not finding any place defining the rules. Any pointers/Links?










share|improve this question
















Well I have been asked to validate passport numbers (the documents used on airports to travel to other countries).



My question is: What format are these "numbers"? All I know is that they can have letters but I am not finding any place defining the rules. Any pointers/Links?







validation






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 5 '12 at 14:17









James Moore

1,8936 gold badges22 silver badges28 bronze badges




1,8936 gold badges22 silver badges28 bronze badges










asked Nov 4 '09 at 14:06









SergioSergio

6,30410 gold badges40 silver badges74 bronze badges




6,30410 gold badges40 silver badges74 bronze badges




closed as off-topic by Machavity, Pearly Spencer, Madhur Bhaiya, Jim Garrison, jww Nov 3 '18 at 17:59


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Machavity, Pearly Spencer, Madhur Bhaiya, Jim Garrison, jww
If this question can be reworded to fit the rules in the help center, please edit the question.







closed as off-topic by Machavity, Pearly Spencer, Madhur Bhaiya, Jim Garrison, jww Nov 3 '18 at 17:59


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Machavity, Pearly Spencer, Madhur Bhaiya, Jim Garrison, jww
If this question can be reworded to fit the rules in the help center, please edit the question.







  • 1





    I guess the rules a different for different countries.

    – Andrey Adamovich
    Nov 4 '09 at 14:11











  • Sorry for the VTC. +1 for asking the question.

    – jww
    Nov 3 '18 at 18:00












  • 1





    I guess the rules a different for different countries.

    – Andrey Adamovich
    Nov 4 '09 at 14:11











  • Sorry for the VTC. +1 for asking the question.

    – jww
    Nov 3 '18 at 18:00







1




1





I guess the rules a different for different countries.

– Andrey Adamovich
Nov 4 '09 at 14:11





I guess the rules a different for different countries.

– Andrey Adamovich
Nov 4 '09 at 14:11













Sorry for the VTC. +1 for asking the question.

– jww
Nov 3 '18 at 18:00





Sorry for the VTC. +1 for asking the question.

– jww
Nov 3 '18 at 18:00












2 Answers
2






active

oldest

votes


















25














I don't think you're going to be able to do this without restricting yourself to certain issuing countries. If you look at the specs of machine readable passports:



http://www.highprogrammer.com/alan/numbers/mrp.html



It says that each country is free to use any format it likes for the actual passport number (including letters or digits). Although in the machine readable schema these seem to be limited to 9 characters (which might cause problems for countries with billions of citizens if they were to just use digits!)






share|improve this answer




















  • 2





    What you are saying is right, but those passports that I saw until now, all consist of one alphabet and 8 digits (9 in total) which caters for about 2.6 billion population. On the other hand China (biggest population) uses passport numbers consist of 9 numbers. may be because they don't expect every Chinese travel the world?

    – AaA
    Oct 29 '13 at 2:41


















7














I would expect the format to depend on the issuing country.



UK passport numbers consist of 9 digits but used to consist of 6 digits and a letter.






share|improve this answer































    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    25














    I don't think you're going to be able to do this without restricting yourself to certain issuing countries. If you look at the specs of machine readable passports:



    http://www.highprogrammer.com/alan/numbers/mrp.html



    It says that each country is free to use any format it likes for the actual passport number (including letters or digits). Although in the machine readable schema these seem to be limited to 9 characters (which might cause problems for countries with billions of citizens if they were to just use digits!)






    share|improve this answer




















    • 2





      What you are saying is right, but those passports that I saw until now, all consist of one alphabet and 8 digits (9 in total) which caters for about 2.6 billion population. On the other hand China (biggest population) uses passport numbers consist of 9 numbers. may be because they don't expect every Chinese travel the world?

      – AaA
      Oct 29 '13 at 2:41















    25














    I don't think you're going to be able to do this without restricting yourself to certain issuing countries. If you look at the specs of machine readable passports:



    http://www.highprogrammer.com/alan/numbers/mrp.html



    It says that each country is free to use any format it likes for the actual passport number (including letters or digits). Although in the machine readable schema these seem to be limited to 9 characters (which might cause problems for countries with billions of citizens if they were to just use digits!)






    share|improve this answer




















    • 2





      What you are saying is right, but those passports that I saw until now, all consist of one alphabet and 8 digits (9 in total) which caters for about 2.6 billion population. On the other hand China (biggest population) uses passport numbers consist of 9 numbers. may be because they don't expect every Chinese travel the world?

      – AaA
      Oct 29 '13 at 2:41













    25












    25








    25







    I don't think you're going to be able to do this without restricting yourself to certain issuing countries. If you look at the specs of machine readable passports:



    http://www.highprogrammer.com/alan/numbers/mrp.html



    It says that each country is free to use any format it likes for the actual passport number (including letters or digits). Although in the machine readable schema these seem to be limited to 9 characters (which might cause problems for countries with billions of citizens if they were to just use digits!)






    share|improve this answer















    I don't think you're going to be able to do this without restricting yourself to certain issuing countries. If you look at the specs of machine readable passports:



    http://www.highprogrammer.com/alan/numbers/mrp.html



    It says that each country is free to use any format it likes for the actual passport number (including letters or digits). Although in the machine readable schema these seem to be limited to 9 characters (which might cause problems for countries with billions of citizens if they were to just use digits!)







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Dec 13 '12 at 15:37

























    answered Nov 4 '09 at 14:16









    UpTheCreekUpTheCreek

    16.2k31 gold badges134 silver badges207 bronze badges




    16.2k31 gold badges134 silver badges207 bronze badges







    • 2





      What you are saying is right, but those passports that I saw until now, all consist of one alphabet and 8 digits (9 in total) which caters for about 2.6 billion population. On the other hand China (biggest population) uses passport numbers consist of 9 numbers. may be because they don't expect every Chinese travel the world?

      – AaA
      Oct 29 '13 at 2:41












    • 2





      What you are saying is right, but those passports that I saw until now, all consist of one alphabet and 8 digits (9 in total) which caters for about 2.6 billion population. On the other hand China (biggest population) uses passport numbers consist of 9 numbers. may be because they don't expect every Chinese travel the world?

      – AaA
      Oct 29 '13 at 2:41







    2




    2





    What you are saying is right, but those passports that I saw until now, all consist of one alphabet and 8 digits (9 in total) which caters for about 2.6 billion population. On the other hand China (biggest population) uses passport numbers consist of 9 numbers. may be because they don't expect every Chinese travel the world?

    – AaA
    Oct 29 '13 at 2:41





    What you are saying is right, but those passports that I saw until now, all consist of one alphabet and 8 digits (9 in total) which caters for about 2.6 billion population. On the other hand China (biggest population) uses passport numbers consist of 9 numbers. may be because they don't expect every Chinese travel the world?

    – AaA
    Oct 29 '13 at 2:41













    7














    I would expect the format to depend on the issuing country.



    UK passport numbers consist of 9 digits but used to consist of 6 digits and a letter.






    share|improve this answer



























      7














      I would expect the format to depend on the issuing country.



      UK passport numbers consist of 9 digits but used to consist of 6 digits and a letter.






      share|improve this answer

























        7












        7








        7







        I would expect the format to depend on the issuing country.



        UK passport numbers consist of 9 digits but used to consist of 6 digits and a letter.






        share|improve this answer













        I would expect the format to depend on the issuing country.



        UK passport numbers consist of 9 digits but used to consist of 6 digits and a letter.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 4 '09 at 14:17









        dave4420dave4420

        41.2k6 gold badges99 silver badges136 bronze badges




        41.2k6 gold badges99 silver badges136 bronze badges













            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

            Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript