Validate MQTT In topics

Fixes #792
This commit is contained in:
Nick O'Leary
2016-02-10 22:38:59 +00:00
parent 4fe7ea00b0
commit 3a97e20bde
2 changed files with 6 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
<!--
Copyright 2013,2015 IBM Corp.
Copyright 2013, 2016 IBM Corp.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
@@ -37,7 +37,7 @@
category: 'input',
defaults: {
name: {value:""},
topic: {value:"",required:true},
topic: {value:"",required:true,validate: RED.validators.regex(/^(#$|(\+|[^+#]*)(\/(\+|[^+#]*))*(\/(\+|#|[^+#]*))?$)/)},
broker: {type:"mqtt-broker", required:true}
},
color:"#d8bfd8",