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 a3fecc4..71c18d2 100644 --- a/slixfeed/xmpp/client.py +++ b/slixfeed/xmpp/client.py @@ -926,6 +926,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) @@ -939,6 +941,8 @@ class Slixfeed(slixmpp.ClientXMPP): label='Amount', desc='Set amount of updates per update.', value=value) + options['validate']['datatype'] = 'xs:integer' + options['validate']['range'] = { 'minimum': 1, 'maximum': 5 } i = 1 while i <= 5: x = str(i)