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

Spanish DNI for children and citizens who live outside of Spain #51

Open
teebu opened this issue May 30, 2023 · 4 comments
Open

Spanish DNI for children and citizens who live outside of Spain #51

teebu opened this issue May 30, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@teebu
Copy link

teebu commented May 30, 2023

Based on this document, there are 2 additional formats allowed for DNI with a designated special latter.

I used these sites as refferences:
https://www.strongabogados.com/tax-id-spain.php
https://docedit.supernaeyeglass.com/articles/#!eyeglass-administration-guides-publication/content-classification-feature-guide/a/h3__54668704
https://www.esma.europa.eu/sites/default/files/library/esma70-1861941480-56_qas_mifir_data_reporting.pdf

DNI (Documento Nacional de Identidad): This is the ID number for Spanish citizens. The DNI format is 8 digits followed by a letter (example: 12345678A). The same number is used for one's driver's license.

There are two other classes of DNI for citizens of Spain:
'K' (example: K12345678A) for children under 14 who are Spanish residents.
'L' (example: L12345678A) for Spanish citizens who live outside Spain.

@teebu teebu changed the title Spanish DNI for Children and Foreigners Spanish DNI for children and citizens who live outside of Spain May 30, 2023
@koblas
Copy link
Owner

koblas commented Jun 2, 2023

@koblas
Copy link
Owner

koblas commented Jun 2, 2023

@koblas
Copy link
Owner

koblas commented Jun 2, 2023

I've dug around a lot and I cannot find any validation algorithms for the "KLM" code set. I've got two choices:

  1. Just allow them without checksum validation
  2. Wait until some test cases are available

Do you currently have some that you're trying to validate?

@teebu
Copy link
Author

teebu commented Jun 5, 2023

No, I dont have any. This is just something I encountered in my research.

Im not clear on the approach. You seem to have done something similar in the other validators.

You did something similar here for NIF https://github.com/koblas/stdnum-js/blob/main/src/es/nif.ts#L65 ?

This site makes it seem like they are just indicators and not part of the checksum? https://www.strongabogados.com/tax-id-spain.php like K12345678A is the same as 12345678A?

Do you think its safe to ignore KL if its present for DNI when validating?

Also here: https://docedit.supernaeyeglass.com/articles/#!eyeglass-administration-guides-publication/content-classification-feature-guide/a/h4_250181372
image

@koblas koblas added the enhancement New feature or request label Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants