Skip to content
This repository has been archived by the owner on May 16, 2018. It is now read-only.

Zend_Validate_Float fail with locale es_VE #717

Open
rafarods opened this issue Aug 15, 2016 · 1 comment
Open

Zend_Validate_Float fail with locale es_VE #717

rafarods opened this issue Aug 15, 2016 · 1 comment

Comments

@rafarods
Copy link

Te version ZF 1.12.19 fail with locale set "es_VE".

Examples:

$valFloat->setLocale('es_VE'); // Locale 'es_VE'
$valFloat->isValid(1234); // returns FALSE (Bad)
$valFloat->isValid(1234.5); // returns TRUE (Good)
$valFloat->isValid('-1234,5'); // returns FALSE (Bad)
$valFloat->isValid('1234,5'); // returns FALSE (Bad)
$valFloat->isValid('1.234,5'); // returns FALSE (Bad)
$valFloat->isValid('1.234'); // returns FALSE (Bad)
$valFloat->isValid('a1.23'); // returns FALSE (Good)
$valFloat->isValid('10e10'); // returns TRUE (Good)
$valFloat->isValid('10e-10'); // returns TRUE (Good)

But, locale "es" is OK.

$valFloat->setLocale('es'); // Locale 'es'
$valFloat->isValid(1234); // returns TRUE (Good)
$valFloat->isValid(1234.5); // returns TRUE (Good)
$valFloat->isValid('-1234,5'); // returns TRUE (Good)
$valFloat->isValid('1234,5'); // returns TRUE (Good)
$valFloat->isValid('1.234,5'); // returns TRUE (Good)
$valFloat->isValid('1.234'); // returns TRUE (Good)
$valFloat->isValid('a1.23'); // returns FALSE (Good)
$valFloat->isValid('10e10'); // returns TRUE (Good)
$valFloat->isValid('10e-10'); // returns TRUE (Good)

Thanks

@froschdesign
Copy link
Member

We are sorry, but ZF1 reaches its End of Life (EOL).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants