Zend_Validate_Float fails to validate zero

107 Views Asked by At

This is the piece of code and this doesnt take zero as an input value. But it does validate well with floating point and integer values. I have tried with setting the locale, but that too doesnt seem to work.

$commNotEmpty = new Zend_Validate_Float();
$commNotEmpty->setMessage('Please enter a numeric value');

$this->comm = new Zend_Form_Element_Text('comm');
$this->comm->class ='full_width';
$this->comm->addValidators(array($commNotEmpty));
0

There are 0 best solutions below