summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0122/data_validation.py
diff options
context:
space:
mode:
authorRobert Robinson <rerobins@gmail.com>2015-09-14 16:35:47 -0600
committerRobert Robinson <rerobins@gmail.com>2015-09-14 17:04:43 -0600
commitf2bf6072ec447cf5cc331b4057b29078b1c932b5 (patch)
tree7ee54178e02ab403a9dbfa2454e0fe40e7de8d78 /sleekxmpp/plugins/xep_0122/data_validation.py
parent5f9abe2e0e06b4cda898db90ba1b524640411e42 (diff)
downloadslixmpp-f2bf6072ec447cf5cc331b4057b29078b1c932b5.tar.gz
slixmpp-f2bf6072ec447cf5cc331b4057b29078b1c932b5.tar.bz2
slixmpp-f2bf6072ec447cf5cc331b4057b29078b1c932b5.tar.xz
slixmpp-f2bf6072ec447cf5cc331b4057b29078b1c932b5.zip
Add plugin
(cherry picked from commit 2296d56)
Diffstat (limited to 'sleekxmpp/plugins/xep_0122/data_validation.py')
-rw-r--r--sleekxmpp/plugins/xep_0122/data_validation.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/sleekxmpp/plugins/xep_0122/data_validation.py b/sleekxmpp/plugins/xep_0122/data_validation.py
new file mode 100644
index 00000000..6f6cbe8c
--- /dev/null
+++ b/sleekxmpp/plugins/xep_0122/data_validation.py
@@ -0,0 +1,19 @@
+from sleekxmpp.xmlstream import register_stanza_plugin
+from sleekxmpp.plugins import BasePlugin
+from sleekxmpp.plugins.xep_0004 import stanza
+from sleekxmpp.plugins.xep_0004.stanza import FormField
+from sleekxmpp.plugins.xep_0122.stanza import FormValidation
+
+
+class XEP_0122(BasePlugin):
+ """
+ XEP-0004: Data Forms
+ """
+
+ name = 'xep_0122'
+ description = 'XEP-0122: Data Forms Validation'
+ dependencies = set(['xep_0004'])
+ stanza = stanza
+
+ def plugin_init(self):
+ register_stanza_plugin(FormField, FormValidation, iterable=True)