Software /
code /
prosody
Changeset
5694:7aec065d78a0
Merge 0.9->trunk
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 13 Jun 2013 23:21:24 +0100 |
parents | 5683:624b874059bf (current diff) 5693:ef490e9276df (diff) |
children | 5695:460070c84eae |
files | |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
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"] =