# HG changeset patch # User Florian Zeitz # Date 1322928648 -3600 # Node ID ea69296afaef245ceebc4f57934f9d7df80b1c3e # Parent 51a7c85751b97e4486ae9c2ff1e73a75c4d8b1bc util.dataforms: Fix verfication for booleans diff -r 51a7c85751b9 -r ea69296afaef util/dataforms.lua --- a/util/dataforms.lua Fri Dec 02 19:24:54 2011 +0100 +++ b/util/dataforms.lua Sat Dec 03 17:10:48 2011 +0100 @@ -252,7 +252,7 @@ field_verifiers["boolean"] = function (data, field_tag, required) data = field_readers["text-single"](field_tag); - if #data == 0 and required then + if ((not data) or (#data == 0)) and required then return "Required value missing"; end if data ~= "1" and data ~= "true" and data ~= "0" and data ~= "false" then