aboutsummaryrefslogtreecommitdiffstats
path: root/util/dataforms.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-09-03 19:44:28 +0200
committerKim Alvefur <zash@zash.se>2018-09-03 19:44:28 +0200
commitf77cf987ce143814665ee20b568e45fd00ad71fc (patch)
treec33458fd7b1f85b66db98a6955b9e226a46e4548 /util/dataforms.lua
parent06d7af79c092201e65b5571ade6f19c0a9282d0d (diff)
downloadprosody-f77cf987ce143814665ee20b568e45fd00ad71fc.tar.gz
prosody-f77cf987ce143814665ee20b568e45fd00ad71fc.zip
util.dataforms: Improve default error message for failed datatype validation
Diffstat (limited to 'util/dataforms.lua')
-rw-r--r--util/dataforms.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/dataforms.lua b/util/dataforms.lua
index e866f502..052d6a55 100644
--- a/util/dataforms.lua
+++ b/util/dataforms.lua
@@ -187,7 +187,7 @@ function form_t.data(layout, stanza, current)
if valid then
value = ret;
else
- value, err = nil, ret or field.datatype;
+ value, err = nil, ret or ("Invalid value for data of type " .. field.datatype);
end
end
data[field.name], errors[field.name] = value, err;