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] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [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