MantisBT: master c2d701e8

Author Committer Branch Timestamp Parent
dregad dregad master 2012-07-29 11:03 master 8945fcc6
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 dd286bf898f3e9ee330f7c4512cf5ca9437d521e)
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