Software /
code /
prosody
Diff
util/dataforms.lua @ 5694:7aec065d78a0
Merge 0.9->trunk
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 13 Jun 2013 23:21:24 +0100 |
parent | 5693:ef490e9276df |
child | 5776:bd0ff8ae98a8 |
child | 6148:7dcd6f124c93 |
line wrap: on
line diff
--- 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"] =