{
  "style": "flat",
  "fields": [
    {
      "table": "catalog_order",
      "frontend_type": "text",
      "backend_type": "string",
      "name": "first",
      "label": "Catalog::theme.checkout.form.first_name.label",
      "label_show": true,
      "default_value": null,
      "rules": [
        "required",
        "min:2",
        "max:255"
      ],
      "error_messages": {
        "first.required": "Catalog::theme.order.validation.first.required"
      }
    },
    {
      "table": "catalog_order",
      "frontend_type": "text",
      "backend_type": "string",
      "name": "last",
      "label": "Catalog::theme.checkout.form.last_name.label",
      "rules": [
        "required",
        "min:2",
        "max:255"
      ],
      "error_messages": {
        "last.required": "Catalog::theme.order.validation.last.required"
      }
    },
    {
      "table": "catalog_order",
      "frontend_type": "text",
      "backend_type": "string",
      "name": "ship_phone",
      "label": "Catalog::theme.checkout.form.phone_number.label",
      "rules": [
        "required",
        "max:255"
      ],
      "error_messages": {
        "ship_phone.required": "Catalog::theme.order.validation.ship_phone.required",
        "ship_phone.numeric": "Catalog::theme.order.validation.ship_phone.numeric"
      }
    },
    {
      "table": "catalog_order",
      "frontend_type": "email",
      "backend_type": "string",
      "name": "ship_email",
      "label": "Catalog::theme.checkout.form.email.label",
      "rules": [
        "required",
        "email",
        "max:255"
      ],
      "error_messages": {
        "ship_email.required": "Catalog::theme.order.validation.ship_email.required"
      }
    },
    {
      "table": "catalog_order",
      "frontend_type": "text",
      "backend_type": "string",
      "name": "ship_address_1",
      "label": "Catalog::theme.checkout.form.address1.label",
      "rules": [
        "required",
        "max:255"
      ],
      "error_messages": {
        "ship_address_1.required": "Catalog::theme.order.validation.ship_address_1.required"
      }
    },
    {
      "table": "catalog_order",
      "frontend_type": "text",
      "backend_type": "string",
      "name": "ship_address_2",
      "label": "Catalog::theme.checkout.form.address2.label",
      "rules": [
        "max:255"
      ]
    },
    {
      "table": "catalog_order",
      "frontend_type": "text",
      "backend_type": "string",
      "name": "ship_address_3",
      "label": "Catalog::theme.checkout.form.address3.label",
      "rules": [
        "max:255"
      ]
    },
    {
      "table": "catalog_order",
      "frontend_type": "text",
      "backend_type": "string",
      "name": "ship_city",
      "label": "Catalog::theme.checkout.form.city.label",
      "rules": [
        "required",
        "max:255"
      ],
      "error_messages": {
        "ship_city.required": "Catalog::theme.order.validation.ship_city.required"
      }
    },
    {
      "table": "catalog_order",
      "frontend_type": "select",
      "backend_type": "string",
      "name": "ship_state",
      "label": "Catalog::theme.checkout.form.state.label",
      "rules": [
        "required",
        "max:255"
      ],
      "selected": "",
      "choices": "{user_states:ship_country}",
      "empty_value": "Choose state",
      "error_messages": {
        "ship_state.required": "Catalog::theme.order.validation.ship_state.required"
      }
    },
    {
      "table": "catalog_order",
      "frontend_type": "text",
      "backend_type": "string",
      "name": "ship_postal",
      "label": "Catalog::theme.checkout.form.postal.label",
      "rules": [
        "required",
        "max:255"
      ],
      "error_messages": {
        "ship_postal.required": "Catalog::theme.order.validation.ship_postal.required"
      }
    },
    {
      "table": "catalog_order",
      "frontend_type": "select",
      "backend_type": "string",
      "name": "ship_country",
      "label": "Country",
      "selected": "US",
      "value": "US",
      "choices": {
        "US": "United States",
        "CA": "Canada"
      },
      "empty_value": "Choose country",
      "rules": [
        "required",
        "max:255"
      ],
      "error_messages": {
        "ship_country.required": "Catalog::theme.order.validation.ship_country.required"
      },
      "readonly": "readonly",
      "attr": {
        "class": "readonly"
      }
    },
    {
      "frontend_type": "submit",
      "name": "submit",
      "label": "Submit",
      "attr": {
        "id": "submit-checkout",
        "class": "btn btn-primary pl-4 pr-4"
      },
      "wrapper": {
        "class": "form-button text-right"
      }
    }
  ]
}
