Function getMessageFromObject

  • Retrieves a specific message from an error object based on a given field.

    Parameters

    • field: undefined | null | string | number | boolean

      The field value to look for in the error messages.

    • obj: ErrorObject

      An object containing error messages.

    • nameOfField: string = 'message'

      The key name within the error object that holds the messages array.

    Returns undefined | null | string

    The message containing the field value, or null if not found.

Generated using TypeDoc