Needs work
Project:
Flexinode
Version:
master
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Jan 2006 at 16:12 UTC
Updated:
12 Jan 2006 at 16:12 UTC
When using the contributed field_number.inc field the validation enforces the field to REQUIRE a numeric value, even when the field is empty and it is not defined as a REQUIRED field.
To remove the check to see if the empty string is numeric the following code must be altered:
function flexinode_field_number_validate($field, $node) {
$fieldname = 'flexinode_'. $field->field_id;
if ($node->$fieldname != '' && !is_numeric($node->$fieldname)) {
form_set_error($fieldname, t('Please input a valid number in %field', array('%field' => $field->label)));
}
}
I don't know who is responsible for the contrib directory maintenance now...?