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

// General data for modules (and drivers created via script) Module: [ { Type: "textfield", //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 values entered by a user //in_value - the coming parameter containing a 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 is returned } } .. ] }; </syntaxhighlight>