Property description

thresholds is an ordered list on the rules block of the date component. Each entry maps a driverValue to a limit, matched by exact comparison against the driver attribute’s current value.

A limit restricts how far in the future a date can be set, expressed as a number of days or years from today.

Minimal JSON

{
    "thresholds": [
        {
            "driverValue": "",
            "limit": {
                "kind": "none"
            }
        }
    ]
}

The following example limits a date attribute to 3 years in the future when a regulation flag is set to YES, or 6 years when set to NO.

{
    "thresholds": [
        {
            "driverValue": "YES",
            "limit": {
                "kind": "years",
                "value": 3
            },
            "errorTranslationKey": "effective_from.error.max_3y"
        },
        {
            "driverValue": "NO",
            "limit": {
                "kind": "years",
                "value": 6
            },
            "errorTranslationKey": "effective_from.error.max_6y"
        }
    ]
}

Nested properties

PropertyDescriptionValuesMandatory
driverValueThe driver attribute value that activates this threshold. Exact match. Type follows the driver attribute (string, boolean, or integer).string / boolean / integerYes
limitThe max-future-date limit when this threshold is active. See limit properties.jsonYes
errorTranslationKeyTranslation key for the inline validation error shown when the date exceeds this limit. If omitted, a generic platform error is used.stringNo

limit properties

PropertyDescriptionValuesMandatory
kindThe shape of the limit. See Supported kind values.stringYes
valueNumber of days or years the date can be in the future. Not used when kind is none.integerNo

Supported kind values

ValueDescription
daysDate must be at most value days after today.
noneNo restriction — picker is open for any future date. When used as the fallback limit, no validation error is ever generated.
yearsDate must be at most value years after today.