diff --git a/slixfeed/__main__.py b/slixfeed/__main__.py index c00e51c..5982de0 100644 --- a/slixfeed/__main__.py +++ b/slixfeed/__main__.py @@ -127,6 +127,7 @@ class JabberClient: def __init__(self, jid, password, hostname=None, port=None, alias=None): xmpp = Slixfeed(jid, password, hostname, port, alias) xmpp.register_plugin('xep_0004') # Data Forms + xmpp.register_plugin('xep_0122') # Data Forms Validation xmpp.register_plugin('xep_0030') # Service Discovery xmpp.register_plugin('xep_0045') # Multi-User Chat xmpp.register_plugin('xep_0048') # Bookmarks diff --git a/slixfeed/xmpp/client.py b/slixfeed/xmpp/client.py index e6e1e93..a9d65a7 100644 --- a/slixfeed/xmpp/client.py +++ b/slixfeed/xmpp/client.py @@ -1018,6 +1018,8 @@ class Slixfeed(slixmpp.ClientXMPP): label='Archive', desc='Number of news items to archive.', value=value) + options['validate']['datatype'] = 'xs:integer' + options['validate']['range'] = { 'minimum': 0, 'maximum': 500 } i = 0 while i <= 500: x = str(i) @@ -1031,6 +1033,8 @@ class Slixfeed(slixmpp.ClientXMPP): label='Amount', desc='Set amount of items per update.', value=value) + options['validate']['datatype'] = 'xs:integer' + options['validate']['range'] = { 'minimum': 1, 'maximum': 5 } i = 1 while i <= 5: x = str(i)