# HG changeset patch # User Matthew Wild # Date 1779711293 -3600 # Node ID 44e5c73e6fa31fae1b7a0adf5319b9ac978d2cbf # Parent 94172bbf907406743f97c7d7c7b96cb9a2a6fe99 util.dataforms: Don't treat invalid jid-multi as missing If all the submitted JIDs were invalid, #results would be 0 and the field would be treated as absent rather than invalid. diff -r 94172bbf9074 -r 44e5c73e6fa3 util/dataforms.lua --- a/util/dataforms.lua Mon May 25 11:32:33 2026 +0100 +++ b/util/dataforms.lua Mon May 25 13:14:53 2026 +0100 @@ -252,7 +252,7 @@ err[#err+1] = ("Invalid JID: " .. raw_value); end end - if #result > 0 then + if #result > 0 or #err > 0 then return result, (#err > 0 and t_concat(err, "\n") or nil); elseif required then return nil, "Required value missing";