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

Validation problems #1

Open
stijnster opened this issue Apr 14, 2017 · 1 comment
Open

Validation problems #1

stijnster opened this issue Apr 14, 2017 · 1 comment

Comments

@stijnster
Copy link

Hi,

first of all, thank you for your work on this. I too am working on a class for objective-c that validates Spanish NIF & CIF, due to the lack of an existing library.

I am using the "official" library, provided by the AEAT called valnif, which validates all types of numbers for an Android application. I decompiled the java class and ported the code over to objective-c.

I was looking for some test CIF & NIF numbers, when I came across your repo and took the liberty to integrate your test numbers into my tests. You can see it here;

https://github.com/stijnster/SLValidador

and more specificaly here;

https://github.com/stijnster/SLValidador/blob/master/TestApp/SLValidador/SLValidadorTests/SLValidadorTests.m

However, when I'm running those tests, I have different results in the NIES1 & NIES2 section based on your code. A lot of numbers get rejected by my validator, while they seem to be ok in yours.

I'm trying to figure out wether there is an issue in my java to objective-c port, or if your code is less strict.

I know this is not really an issue in your code base, so my apologies for raising one in the first place, but I couldn't find another way to contact you ;)

@rmelian2014
Copy link
Owner

rmelian2014 commented Apr 14, 2017

@stijnster Hello friend I had been testing my test numbers again, this time with this webPage http://www.alfanet.es/nif.php and all of them just passed as my code test, and I also have checked this web page https://fjrodriguezg.wordpress.com/2015/02/24/validando-nif-en-java-con-la-lbreria-de-aeat-los-nuevos-certificados-de-la-fnmt-y-sorpresa/ where is explained that some CIF numbers are valid only from 2016 so maybe this is the issue, so I recommend you use my code and convert in Objective-C or use it, as you want, you can check in my repo page from where i get this code, sorry for my english, is not the best ;)

you can write me, my email is [email protected], I will be glad to know about it,

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

2 participants