• Validate a possibly-changed shortcode for a body part or body location.

    When the submitted shortcode is unchanged it is accepted as-is; otherwise it is checked with validateBodyShortcode. On rejection the plan keeps the entry's current shortcode and reports the reason, so an in-progress edit is never lost to a bad shortcode.

    Pure and Foundry-free.

    Parameters

    • currentShortcode: string

      The shortcode the entry is stored with today.

    • submittedShortcode: string

      The shortcode from the edited form (trimmed here).

    • siblingShortcodes: readonly string[]

      The shortcodes of the other sibling entries (excluding the one being edited).

    • noun: string

      The entry kind, for the message (e.g. "body part").

    • scope: string

      Where uniqueness applies, for the message (e.g. "this body").

    Returns BodyShortcodeSavePlan

    A BodyShortcodeSavePlan.