Home » Validate » Validate_ES » Bug #4660
La validación es incorrecta.
Details
| 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) |
Comments
[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.
[2006-08-25 08:09 UTC] badams at php dot net
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