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

Should "-" be removed? #14

Open
luixal opened this issue Sep 27, 2021 · 1 comment
Open

Should "-" be removed? #14

luixal opened this issue Sep 27, 2021 · 1 comment

Comments

@luixal
Copy link

luixal commented Sep 27, 2021

Hi,

It's great to have this package so I can get rid of some "not as handy" gists.

One thing is, I've always stored DNIs witouth the "-" char between the number and the letter. This is: 12345678Z instead of 12345678-Z.

I don't know for sure which the official format so I made some research and found these:

in both cases, it doesn't include the "-" char in the format (in other cases they show a DNI containing the "-" as invalid) so... I'm thinking the valid format shouldn't include it.

¿Could the "-" be optional in this lib?

Thanks!

@luixal
Copy link
Author

luixal commented Sep 27, 2021

After doing some tests, it seems the "-" is optional. If I pass a DNI without it, it gets validated and returned without the "-" char.

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

1 participant