Skip to content

Add Spain National ID validator #7574

Closed
@carlos3dx

Description

@carlos3dx

Feature description

In Spain all citizens has a National ID composed by 8 numbers plus a letter. The letter in fact is calculated with a modulus of the number and a lookup table, avoiding mistyping the ID or people faking it on the fly-

https://en.wikipedia.org/wiki/Documento_Nacional_de_Identidad_(Spain)#Number

Create a function that given a string like "12345678X" (or "12345678-X", some systems put a dash) returns True or False if it is a valid or not.

Would you like to work on this feature?

  • Yes, I want to work on this feature!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThis PR modified some existing files

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions