# getSchemaMessage

> This document is the Markdown version of [valibot.dev/api/getSchemaMessage/](https://valibot.dev/api/getSchemaMessage/). For the complete documentation index, see [llms.txt](https://valibot.dev/llms.txt).

Returns a schema error message.

```ts
const message = v.getSchemaMessage(lang);
```

## Parameters

- `lang` `string | undefined`

## Returns

- `message` `ErrorMessage<BaseIssue<unknown>> | undefined`
