Preparing search index...

    Function firstErrorMessage

    • Returns the first translated message found anywhere in the given errors sub-tree, or undefined when the sub-tree has no errors. Used by the screen to surface a single inline error per field even when the schema attaches issues to nested paths (e.g. nutrition fields, ingredient rows).

      Walks the tree depth-first and returns on the first leaf with a message, mapping the schema key through INLINE_KEY_MAP so callers always receive the inline-phrasing translation.

      Parameters

      • node: unknown
      • t: (key: string) => string

      Returns string | undefined