[**@bondsports/general**](../README.md) • **Docs**

***

[@bondsports/general](../globals.md) / addError

# Function: addError()

> **addError**(`propertyName`, `error`, `errors`?): `void`

Adds an error message to the specified property in the validation errors object.

## Parameters

• **propertyName**: `string`

The name of the property to add the error to.

• **error**: `string`

The error message to add.

• **errors?**: `ValidationErrorResult`

The validation errors object.

## Returns

`void`

## Defined in

[validations/pricing/validation-product-price.util.ts:26](https://github.com/Bond-Sports/bondUtils/blob/545f16ceb055481acfd7641d7809c0f252d3a5e6/packages/general/src/validations/pricing/validation-product-price.util.ts#L26)
