states/VA.json

{
  "state": "VA",
  "spec": {
    "document": "VA 813 EDI Guide",
    "version": "11.0",
    "where": "https://www.dmv.virginia.gov/businesses/tax-act/vaets",
    "pinned": "2017-04",
    "checked": "2026-09-23",
    "note": "Virginia files through VAETS now, and its current EDI guides sit behind the VAETS login. no newer public guide was found when checked, so the tests stay on 11.0. where the state sets a rule for bol, quantity or a tax id, the test follows it; where it does not, the test is ours."
  },
  "max_length": {
    "supplier.name": 35,
    "consignor.name": 35,
    "consignee.name": 35,
    "consignee.address": 35,
    "consignee.city": 30
  },
  "tests": [
    {
      "type": "Freight",
      "name": "BOL is missing or over 15 characters",
      "field": "bol",
      "test": "^.{1,15}$"
    },
    {
      "type": "Freight",
      "name": "Net is not a 1 to 15 digit number",
      "field": "net",
      "test": "^[0-9]{1,15}$"
    },
    {
      "type": "Freight",
      "name": "Gross is not a 1 to 15 digit number",
      "field": "gross",
      "test": "^[0-9]{1,15}$"
    },
    {
      "type": "Freight",
      "name": "No Commodity Code Mapping",
      "field": "cmd_code",
      "test": "^(?!nocode-).+$"
    },
    {
      "type": "Freight",
      "name": "Missing Ship Date",
      "field": "shipped",
      "test": "^.+$"
    },
    {
      "type": "Freight",
      "name": "Missing Shipper",
      "field": "shipper.cmp_id",
      "test": "^.+$"
    },
    {
      "type": "Freight",
      "name": "Missing Supplier",
      "field": "supplier.cmp_id",
      "test": "^.+$"
    },
    {
      "type": "Freight",
      "name": "Missing AccountOf/Consignor",
      "field": "consignor.cmp_id",
      "test": "^.+$"
    },
    {
      "type": "Freight",
      "name": "Missing Consignee",
      "field": "consignee.cmp_id",
      "test": "^.+$"
    },
    {
      "type": "Shipper",
      "name": "Shipper TCN missing or Invalid Format",
      "field": "shipper.tcn",
      "test": "^T[0-9]{2}[a-z]{2}[0-9]{4}$"
    },
    {
      "type": "Supplier",
      "name": "Supplier Tax ID is not a 9 digit number",
      "field": "supplier.tax_id",
      "test": "^[0-9]{9,}$"
    },
    {
      "type": "Consignor",
      "name": "Consignor Tax ID is not 9 characters",
      "field": "consignor.tax_id",
      "test": "^.{9}$"
    },
    {
      "type": "Consignee",
      "name": "Missing Consignee name",
      "field": "consignee.name",
      "test": "^.+$"
    },
    {
      "type": "Consignee",
      "name": "Missing Consignee City",
      "field": "consignee.city",
      "test": "^.+$"
    },
    {
      "type": "Consignee",
      "name": "Consignee State is not 2 Letters",
      "field": "consignee.state",
      "test": "^[a-z]{2}$"
    },
    {
      "type": "Consignee",
      "name": "Missing Consignee Zip",
      "field": "consignee.zip",
      "test": "^.+$"
    },
    {
      "type": "Consignee",
      "name": "Consignee Tax ID is not 9 to 18 characters",
      "field": "consignee.tax_id",
      "test": "^.{9,18}$"
    }
  ]
}