{
  "name": "rowrules/several-row-rules",
  "rules": {
    "columns": [
      {
        "key": "kind",
        "enum": [
          "개인",
          "법인"
        ]
      },
      {
        "key": "crn",
        "type": "kr.crn"
      },
      {
        "key": "start",
        "type": "date"
      },
      {
        "key": "end",
        "type": "date"
      }
    ],
    "rowRules": [
      {
        "when": {
          "col": "kind",
          "eq": "법인"
        },
        "require": [
          "crn"
        ]
      },
      {
        "compare": [
          "start",
          "<=",
          "end"
        ]
      }
    ]
  },
  "rows": [
    {
      "kind": "법인",
      "start": "2024-02-01",
      "end": "2024-01-01"
    }
  ],
  "expect": {
    "ok": false,
    "errors": [
      {
        "row": 2,
        "key": "crn",
        "code": "ROW_REQUIRE"
      },
      {
        "row": 2,
        "key": "start",
        "code": "ROW_COMPARE"
      }
    ],
    "warnings": [],
    "rows": [
      {
        "$row": 2,
        "kind": "법인",
        "crn": null,
        "start": "2024-02-01",
        "end": "2024-01-01"
      }
    ]
  }
}
