util.dataforms: Don't return invalid JIDs in jid-single.

This commit is contained in:
Kim Alvefur 2012-05-17 21:25:41 +02:00
parent 9cf153e1bc
commit 644b8615f3

View file

@ -156,7 +156,7 @@ field_readers["jid-single"] =
if data and #data > 0 then
return data
elseif raw_data then
return raw_data, "Invalid JID";
return nil, "Invalid JID: " .. raw_data;
elseif required then
return nil, "Required value missing";
end