Fix a bug where the value 0 wasn't valid when entering

data into the DataForm.
This commit is contained in:
Colin Kuskie 2008-09-03 22:13:06 +00:00
parent 01cbbf2e60
commit 8573be8582
2 changed files with 2 additions and 1 deletions

View file

@ -17,6 +17,7 @@
- fixed: PurgeOldInboxMessages just didn't work
- fixed: Unable to delete data form entries
- fixed: Select All checkbox in Asset Manager has returned
- fixed: DataForm Integer value zero does not pass validation
- added: Page range (start-finish) to available paginator text
7.5.22

View file

@ -1371,7 +1371,7 @@ sub www_process {
});
WebGUI::Macro::filter(\$value);
}
if ($field->{status} eq "required" && (!$value || $value =~ /^\s*$/)) {
if ($field->{status} eq "required" && (! defined($value) || $value =~ /^\s*$/)) {
push @errors, {
"error.message" => $field->{label} . " " . $i18n->get(29) . ".",
};