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

Is NIE validator incorrect? #4

Open
rdavid2 opened this issue Feb 11, 2021 · 2 comments
Open

Is NIE validator incorrect? #4

rdavid2 opened this issue Feb 11, 2021 · 2 comments

Comments

@rdavid2
Copy link

rdavid2 commented Feb 11, 2021

I have a question about the validation, an old nie with 8 numeric digits still be valid? because the validation says not.

Reference:
https://es.wikipedia.org/wiki/N%C3%BAmero_de_identidad_de_extranjero
The Law INT/2058/2008 reduces to 7 the numerioc characters but keeps vigent the old NIES with 8 numeric characters.

Your validation for nie says exactly 7 times for numeric digits
const NIE_REGEX = '#^(?['. self::NIE_TYPES .'])(?[0-9]{7})(?[A-Z])$#';

@acasademont
Copy link
Collaborator

@rdavid2 sorry for taking super extra long, is this something you're interested in? We never found an issue (but maybe also no foreigner with an 8 char NIE used our service :p )

@sdepablos sdepablos reopened this Nov 14, 2023
@rdavid2
Copy link
Author

rdavid2 commented Jan 14, 2024

I found this error in a real case, but now I don't have an example.

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

No branches or pull requests

3 participants