Skip to content

contentFieldLimitError

contentFieldLimitError(path, value): string | null

Returns a validation error message if the given string exceeds MAX_CONTENT_FIELD_BYTES when UTF-8 encoded, or null if it is within the limit.

string

The field path, used to identify the offending field in the message.

string

The candidate field value to measure.

string | null