pluf2

pluf2 Commit Details


Date:2010-03-16 05:08:48 (14 years 9 months ago)
Author:Brian Armstrong
Branch:master
Commit:819b375e5c6b7dcf6eaca3141791340661482272
Parents: ff273e083c19cb3dee15b9ab7f1ce861f8f1d354
Message:Fixed issue 394, Pluf_Form_Field_Float::clean does not account for leading/trailing 0's

Changes:

File differences

src/Pluf/Form/Field/Float.php
3333
3434
3535
36
37
38
36
3937
4038
39
4140
4241
4342
if (in_array($value, $this->empty_values)) {
$value = '';
}
$_value = $value;
$value = (float) $value;
if ((string) $value !== (string) $_value) {
if (!is_numeric($value)) {
throw new Pluf_Form_Invalid(__('Enter a number.'));
}
$value = (float) $value;
if ($this->max_value !== null and $this->max_value < $value) {
throw new Pluf_Form_Invalid(sprintf(__('Ensure this value is less than or equal to %s.'), $this->max_value));
}

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.05822s using 14 queries.