[
    {
        "step_title": "Aria2 Configuration",
        "invalid_next_disabled": true,
        "items": [
            {
                "type": "textfield",
                "subitems": [
                    {
                        "key": "wizard_download_share",
                        "desc": "Shared folder for downloads",
                        "defaultValue": "downloads",
                        "validator": {
                            "allowBlank": false,
                            "regex": {
                               "expr": "/^[^<>: */?\"]*/",
                               "errorText": "Share name must be a folder name only. Path separators, spaces and other special chars are not allowed."
                            }
                        }
                    }
                ]
            },
            {
                "type": "password",
                "subitems": [
                    {
                        "key": "wizard_rpc_secret",
                        "desc": "rpc-secret",
                        "emptyText": "please provide a secret",
                        "validator": {
                            "allowBlank": false,
                            "regex": {
                                "expr": "/^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)[a-zA-Z\\d@$!%*#?&]{8,}$/",
                                "errorText": "Minimum eight characters, at least one uppercase letter, one lowercase letter and one number"
                            }
                        }
                    }
                ]
            },            
            {
                "type": "textfield",
                "subitems": [
                    {
                        "key": "wizard_max_concurrent_downloads",
                        "desc": "max-concurrent-downloads",
                        "defaultValue": "10",
                        "validator": {
                            "allowBlank": false,
                            "regex": {
                                "expr": "/^([1-9]|[12][0-9]|30)$/",
                                "errorText": "Range 1-30, default 10"
                            }
                        }
                    },
                    {
                        "key": "wizard_max_connection_per_server",
                        "desc": "max-connection-per-server",
                        "defaultValue": "5",
                        "validator": {
                            "allowBlank": false,
                            "regex": {
                                "expr": "/^([1-9]|1[0-5])$/",
                                "errorText": "Range 1-15, default 5"
                            }
                        }
                    },
                    {
                        "key": "wizard_max_upload_limit",
                        "desc": "max-upload-limit",
                        "defaultValue": "16K",
                        "validator": {
                            "allowBlank": false,
                            "regex": {
                                "expr": "/^\\d+(|K|M)$/",
                                "errorText": "0 means unrestricted. You can append K or M (1K = 1024, 1M = 1024K)."
                            }
                        }
                    },
                    {
                        "key": "wizard_seed_ratio",
                        "desc": "seed-ratio",
                        "defaultValue": "0.0",
                        "validator": {
                            "allowBlank": false,
                            "regex": {
                                "expr": "/^(1\\.0)|(0\\.[0-9])$/",
                                "errorText": "Range 0.0-1.0, default 0.0"
                            }
                        }
                    },
                    {
                        "key": "wizard_seed_time",
                        "desc": "seed-time",
                        "defaultValue": "0",
                        "validator": {
                            "allowBlank": false,
                            "regex": {
                                "expr": "/^\\d+$/",
                                "errorText": "Specify seeding time in (fractional) minutes"
                            }
                        }
                    },
                    {
                        "key": "wizard_disk_cache",
                        "desc": "disk-cache",
                        "defaultValue": "32M",
                        "validator": {
                            "allowBlank": false,
                            "regex": {
                                "expr": "/^\\d+(|K|M)$/",
                                "errorText": "SIZE can include K or M (1K = 1024, 1M = 1024K), default: 32M"
                            }
                        }
                    }
                ]
            },
            {
                "type": "combobox",
                "subitems": [
                    {
                        "key": "wizard_file_allocation",
                        "desc": "file-allocation",
                        "editable": false,
                        "defaultValue": "falloc",
                        "store": [ "none", "prealloc", "trunc", "falloc" ],
                        "validator": {
                            "allowBlank": false
                        }                        
                    }
                ]
            },
            {
                "type": "combobox",
                "subitems": [
                    {
                        "key": "wizard_log_level",
                        "desc": "log-level",
                        "editable": false,
                        "defaultValue": "error",
                        "store": [ "debug", "info", "notice", "warn", "error" ],
                        "validator": {
                            "allowBlank": false
                        }
                    }
                ]
            }
        ]
    }
]
