config = { device: "Device Name", swVersion: "1.0", hwVersion: "1.0", sections: { network: { title: "Network", fields: [ { id: "macaddr", type: "mac", title: "MAC address", pattern: "[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}", invalidmsg: "Enter MAC address. E.g. 00:11:22:33:44:55", required: true, }, { id: "ipaddr", type: "ip", title: "IP address", pattern: "\\d+.\\d+.\\d+.\\d+", hint: "192.168.4.2", invalidmsg: "Enter IP address. E.g. 192.168.4.2", required: true, }, { id: "netmask", type: "netmask", title: "Netmask", pattern: "\\d+.\\d+.\\d+.\\d+", hint: "255.255.255.0", invalidmsg: "Enter network mask. E.g. 255.255.255.0", required: true, }, { id: "gateway", type: "ip", title: "Gateway", pattern: "\\d+.\\d+.\\d+.\\d+", }, ], }, }, }