anyone knows any function or regular expression to validate the id number of id card from all countries?
I found this regular expression, who validates id number from Spain but i need validate all id number from all countries.
^((([A-Z]|[a-z])\d{8})|(\d{8}([A-Z]|[a-z])))$
Thanks.
You cannot validate id numbers from all countries by one regular expressions becouse each country has a different policy for example in my country it is validated by
^\\d{14}$a.e., 14 numbers.What you can do is associate each country with a regex pattern and validate the id depending on its country.