Skip to main content

Function: getBaseLinkIdFromErrorKey()

getBaseLinkIdFromErrorKey(errorKey): string

Recovers the base linkId from an instance-scoped validation error key produced by getValidationErrorKey. Useful for consumers that need to map error keys back to Questionnaire items (e.g. finding which tab contains the first error).

Note this truncates at the first separator, so a linkId that itself contains /// would be shortened. Such linkIds are not expected in practice.

Parameters

ParameterType
errorKeystring

Returns

string