Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

These files are stored in conf/form_schema schemas and are json encoded schema which will tell our form system how to render.

...

https://github.com/powmedia/backbone-forms#validation

Code Block
languagejs
themeMidnight
{
    "label": "Customer Data",
    "description": "Edit in conf/form_schemas/opCharts_element_inventory_customer.json",
    "component": ["element_lists"],
    "tags": ["interface"],
    "schema": {
        "customerId": {
            "label": "Customer ID",
            "type": "Text"
        },
        "upStream": {
            "label": "Upstream Contract Speed",
            "type": "Number",
            "validators": [
                { "type": "range", "min": 1, "max": 10000, "message": "Mbps should be between 1 and 10000" }
            ]
        },
        "downStream": {
            "label": "Downstream Contract Speed",
            "type": "Number",
            "validators": [
                { "type": "range", "min": 1, "max": 10000, "message": "Mbps should be between 1 and 10000" }
            ]
        }
    }
}