# HG changeset patch # User Matthew Wild # Date 1371162084 -3600 # Node ID 7aec065d78a0ca2ca3d1d51919481f4cf16221ee # Parent 624b874059bf79af711a5444a6f29467ff0ca741# Parent ef490e9276df71eb76cfb2e444e15ce04d5ea553 Merge 0.9->trunk diff -r 624b874059bf -r 7aec065d78a0 util/dataforms.lua --- a/util/dataforms.lua Thu Jun 13 13:56:58 2013 +0100 +++ b/util/dataforms.lua Thu Jun 13 23:21:24 2013 +0100 @@ -187,7 +187,11 @@ for value in field_tag:childtags("value") do result[#result+1] = value:get_text(); end - return result, (required and #result == 0 and "Required value missing" or nil); + if #result > 0 then + return result; + elseif required then + return nil, "Required value missing"; + end end field_readers["text-multi"] =