Using “.” for decimals in zend validator float
问题 I have a form with a element called "price". I validate this element with the "float" validator. The thing is when I insert, for example: 12,50 => it is valid but when I try to save it on the DB (mysql) it is saved as "12.00" So I wanna to change the decimal character from "," to ".". Does anybody knows how?? Note. If I put: $price->addValidator('Float', 'de') or $validator = new Zend_Validate_Float(array('locale' => 'de')); $price->addValidator($validator) It does not work. 回答1: You can use