Commit graph

11 commits

Author SHA1 Message Date
Kim Alvefur
bc20052a9b util.dataforms: Add support for validating (integer) ranges 2019-11-21 18:56:43 +01:00
Kim Alvefur
8de93db692 util.dataforms: Add more XEP-0211 media element test coverage 2020-08-16 20:30:02 +02:00
Kim Alvefur
1c0e4300ab util.dataforms: Convert media element sizes to avoid error on Lua 5.3
The stanza API does not accept number values and threw an error due to
the height and width attributes of the media element (XEP-0221).

This part had no test coverage previously, explaining why it was not
discovered until now.
2020-08-16 12:55:55 +02:00
Kim Alvefur
6b533ad772 util.dataforms: Improve descriptions in tests 2019-12-16 02:02:47 +01:00
Kim Alvefur
9c1528bf2e util.dataforms: Add support for XEP-0122: Data Forms Validation
Initially only basic validation of xs:integer
2018-09-01 03:10:09 +02:00
Kim Alvefur
3da47d7dde util.dataforms: Allow field names to be different from the 'var' attribute
This should allow the usage of long prefixes and namespace-like names to
be contained to the XML representation of the form, so that the code can
use more convenient names.
2018-09-01 01:24:46 +02:00
Kim Alvefur
876b96659c util.dataforms: Allow passing the current values to be used in stead of omitted fields 2018-08-05 15:50:06 +02:00
Kim Alvefur
00a2891787 util.dataforms: Add failing test for #1177 2018-06-30 20:49:26 +02:00
Kim Alvefur
0913989a69 util.dataforms: Include a fixed field in test 2018-07-15 22:35:42 +02:00
Kim Alvefur
a7448e43e0 util.dataforms: Add a simple function for identifying form types
This is meant to allow identifying forms without parsing them
completely.
2018-06-02 19:57:46 +02:00
Kim Alvefur
2a7da89567 util.dataforms: Add initial tests
This covers basic form generation, that the fields have the correct
attributes, children and text content.
2018-06-02 19:47:09 +02:00