> For the complete documentation index, see [llms.txt](https://docs.coherent.global/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coherent.global/build-spark-services/additional-mappings/error-messages-xvalidate.md).

# Error messages (Xvalidate)

Syntax: `Xvalidate_<parameter>`

Raise custom error messages based on the value of a mapped field.

1. Define the formula for `Xvalidate`.
   1. `Xvalidate` should be used with the [`IF`](https://support.microsoft.com/en-us/excel/functions/if-function) function. Use the formula's result to determine whether a message is returned.
   2. For example, `=IF(A3 < 1000, "Insufficient value", "")`, if the value of `A3` is less than `1000`, return the error message `Insufficient value`, otherwise `""` means not to return an error.
2. Select the cell containing the formula and enter a name in the format of `Xvalidate_<parameter>`, for example, `Xvalidate_eligibility`.

## Sample file

{% file src="/files/3OhBwjPADNHVYWZFF3x2" %}
