MantisBT: master-1.2.x 9094a34d

Author Committer Branch Timestamp Parent
dregad dregad master-1.2.x 2012-07-29 11:03 master-1.2.x 79e4d02d
Affected Issues  0014516: Custom field needs value when reporting following upgrade to 1.2.11
Changeset

Custom field validation should pass when empty and min length > 0

Fix for 0012029 (commit 9c71d4f884200f682636e772cf3584202fc2443d)
introduced a regression in the validation of numeric custom fields when
the field's minimum length is greater than 0 and the data being
validated is empty. This prevents e.g. reporting of new issues with a
hidden custom field, or updating issues having a non-required, empty
field.

This commit resolves the problem by passing validation when the field is
empty. This should not cause problems for required fields, as that case
is covered by an earlier check in bug_report.php and bug_update.php.

Fixes 0014516

mod - core/custom_field_api.php Diff File