Skip to content
On this page

Function: freeTextProblem()

TypeScript
function freeTextProblem(value: string, max: number): NameProblem | null;

Defined in: display-name.ts:171 (opens in a new tab)

Why free text (already trimmed) cannot be kept, or null when it can: a label, a note or a tagline, which may mention orangecheck where a name may not. Every check of nameProblem applies but its word check. Instead the text is refused when all of it is one of our names, whatever its case, width, spacing or variation selectors: "OCHK" and "Orange Check" are refused, "Earn sats with OrangeCheck" is not. Unlike nameProblem, it does not read look-alike letters from other scripts.

ParametersLink to this section

ParameterType
valuestring
maxnumber

ReturnsLink to this section

NameProblem | null