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
commit715b48872212184319aac5556e9edc41758d928a (patch)
treec33458fd7b1f85b66db98a6955b9e226a46e4548 /util/dataforms.lua
parenta6d4c6c8f63f945cacf47521a1e2b9cb020c88a3 (diff)
downloadprosody-715b48872212184319aac5556e9edc41758d928a.tar.gz
prosody-715b48872212184319aac5556e9edc41758d928a.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;