PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Validate » Validate_ES » Bug #4660

La validación es incorrecta.

Details

Submitted2005-06-22 13:56 UTC
Fromvicen dot martinez at gmail dot com
Assignedbadams
StatusClosed
PackageValidate_ES
PHP Version4.3.9
OSGNU/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