Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.6.2

Bug #4660 La validación es incorrecta.
Submitted: 2005-06-22 13:56 UTC
From: vicen dot martinez at gmail dot com Assigned: badams
Status: Closed Package: Validate_ES
PHP Version: 4.3.9 OS: GNU/Linux
Roadmaps: (Not assigned)    
Subscription  


 [2005-06-22 13:56 UTC] vicen dot martinez at gmail dot com
Description: ------------ Los DNI para extrangeros comienzan con una X, por lo tanto esta regla al comprobar no cumple: * Valida un DNI Español (el dni tiene que ser de la forma 11111111X) En una llamada a la función tal que: $dnistr = "X24398086P"; echo dni($dnistr); Un posible arreglo sería comprobar la longitud del DNI y hacer la comprobación correspondiente del número a partir de la posición correcta (es decir, la variable $number) y a su vez comprobar la primera letra, que creo que debería ser siempre X.

Comments

 [2005-07-31 06:36 UTC] dufuz
Could you translate this to English since not all the developers understand Spanish. Thanks :-)
 [2006-08-25 08:09 UTC] badams at php dot net (Byron Adams)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. The problem was that it would not accept foreign national DNI numbers