-
-
Notifications
You must be signed in to change notification settings - Fork 17
Configuration Item String
This type describe a string data
This field define the type as string
"type" : "string"
The defaultValue field permit to set the default value of the parameter. If not set the default value is an empty string.
"defaultValue" : "john"
It define the max size of the string.
"maximumLength" : "30"
It defined the field as required. It is not possible to validate the form without have been filling at least one character in this field.
"required" : "true"
It defined the field as encrypted. It will be shown as a password in the configuration form. The text will be encrypted with a light encrypting algorithm before sending it to the server. There is two kind of password based on usages. You can define decrytable passwords or not. Encryption method will be chosen depending on the "decryptable" attribute value. A plugin or a widget can ask for parameters and could decrypt password if "decrytable" attribue is set. If it is not decryptable, the plugin or widget could only encrypt his string using MD5 hex encoding and compare it the the encoded string.
If omitted, the password is decryptable.
"encrypted" : "true",
"decryptable" : "true"
It is possible to set a regex in order to make validation of the field. The regex must be with an error message which can be translated as same as name and description fields.
"regex" : "([0-9]{1,3}\\.){3}[0-9]{1,3}",
"regexErrorMessage" : "Must be an ipv4 adress like 192.168.0.12"
"ipAddress" : {
"type" : "string",
"name" : "IP Address",
"description" : "Set the IP Address of the peripheral",
"regex" : "([0-9]{1,3}\\.){3}[0-9]{1,3}",
"regexErrorMessage" : "Must be an ipv4 adress like 192.168.0.12",
"required" : "true"
}
Yadoms -- The ultimate house automation solution