Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.2.0-ALPHA1
-
Fix Version/s: 1.2.0-BETA2
-
Component/s: Validators
-
Labels:None
-
Environment:Apache/2.2.11 (Win32) PHP/5.2.11, windows vista
Description
Test case:
1) set locale: setlocale(LC_ALL, "") (on windows it sets current international control panel settings), in case of Polish locale it changes decimal point to ',' (comma)
2) try to save value "12,12" of decimal type field (mysql type):
,
3) it gives you validation error (length)
Summary:
Doctrine_Validator->validateLength() could not count length properly.
Idea:
I changed dot character in explode function to proper env character:
// changes start
$localeInfo = localeconv();
$e = explode($localeInfo["mon_decimal_point"], $value);
// changes end
It works for me.
Enclosed Validator.php