Skip to content

Instantly share code, notes, and snippets.

@vigikaran
Created September 27, 2021 09:09
Show Gist options
  • Save vigikaran/c960d829e328a88a97ba3d04b0b32b02 to your computer and use it in GitHub Desktop.
Save vigikaran/c960d829e328a88a97ba3d04b0b32b02 to your computer and use it in GitHub Desktop.

Revisions

  1. vigikaran created this gist Sep 27, 2021.
    48 changes: 48 additions & 0 deletions schema.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,48 @@
    {
    validation : [],
    uischema: {
    port: {
    "ui:widget": "radio",
    },
    activation_date: {
    "ui:widget": "date",
    },
    },
    schema:{
    type: "object",
    properties: {
    port: {
    title: "Connection Type",
    type: "boolean",
    default: true,
    enumNames: ["Port Existing Number", "New Number"],
    },
    },
    dependencies: {
    port: {
    oneOf: [
    {
    properties: {
    port: {
    enum: [true],
    },
    porting_to: {
    title: "Number you wish to Port",
    type: "string",
    },
    pac_code: {
    title: "PAC Code",
    type: "string",
    },
    activation_date: {
    title: "Activation Date",
    type: "string",
    },
    },
    required: ["porting_to", "pac_code"],
    },
    ],
    },
    },
    }
    }