Материал из Module developer
Перейти к: навигация, поиск

// General data for a module (and drivers created via script) Module: [ { Type: "textfield", //It signals that a text field to enter data has to be shown Name: "Relay Count", //Property name that can be received in a module via module.GetProperty Validation: function (in_value) { //Function to check data entered by a user //in_value - the incoming parameter containing value entered by a user if (in_value != "") return 0; //If there are no errors 0 is returned else return "Please input Count"; //If there are errors, error text has to be returned } } .. ] }; </syntaxhighlight>