Skip to content

Validation JSON

jcadam14 edited this page Apr 24, 2024 · 6 revisions

Validation JSON from the Client

NOTE FOR THE FRONTEND: record_no is indexed by 1, with 1 being the first entry in a SBLAR, 2 being the second, etc. This does not line up with the concept of "row number" as would be seen in Excel, where the headers would be row 1. Therefore, add 1 to the record_no to get the 'row', as defined by our program.

[
  ...
  {
        "validation": {
            "id": "E0700",
            "name": "gross_annual_revenue_flag.invalid_enum_value",
            "description": "'Gross annual revenue: NP flag' must equal 900 or 988.",
            "severity": "error",
            "type": "single-field"
        },
        "records": [
            {
                "record_no": 186,
                "uid": "123456TESTBANK0014000186",
                "fields": [
                    {
                        "name": "gross_annual_revenue_flag",
                        "value": ""
                    }
                ]
            },
            {
                "record_no": 187,
                "uid": "123456TESTBANK0014000187",
                "fields": [
                    {
                        "name": "gross_annual_revenue_flag",
                        "value": "99009001"
                    }
                ]
            }
        ]
    },
    {
        "validation": {
            "id": "E0720",
            "name": "gross_annual_revenue.invalid_numeric_format",
            "description": "When present, 'gross annual revenue' must be a numeric value.",
            "severity": "error",
            "type": "single-field"
        },
        "records": [
            {
                "record_no": 188,
                "uid": "123456TESTBANK0014000188",
                "fields": [
                    {
                        "name": "gross_annual_revenue",
                        "value": "nonNumericValue"
                    }
                ]
            },
            {
                "record_no": 189,
                "uid": "123456TESTBANK0014000189",
                "fields": [
                    {
                        "name": "gross_annual_revenue",
                        "value": "must be blank"
                    }
                ]
            }
        ]
    },
    {
        "validation": {
            "id": "E2009",
            "name": "action_taken_date.date_value_conflict",
            "description": "The date indicated by 'action taken date' must occur on or after 'application date'.",
            "severity": "error",
            "type": "multi-field"
        },
        "records": [
            {
                "record_no": 1,
                "uid": "123456TESTBANK0014000001",
                "fields": [
                    {
                        "name": "action_taken_date",
                        "value": "20011231"
                    },
                    {
                        "name": "app_date",
                        "value": "20241201"
                    }
                ]
            }
        ]
    },
    ...
]
Clone this wiki locally