Function getMessageByField

  • Retrieves the first error message found for any of the given fields.

    Parameters

    • fieldsToCheck: string | string[]

      A string or an array of strings representing the fields to check.

    • errors: ErrorMessages

      An object containing error messages.

    Returns undefined | string

    The first error message found for any of the given fields, or undefined if not found.

Generated using TypeDoc