auth/name_schema.ts view source
(label: string): PipeSchema<string, PipeSchema<string, StringSchema>> import {create_name_schema} from '@fuzdev/fuz_app/auth/name_schema.js'; A @fuzdev/fuz_schema schema for a name of one domain: bounded_string
at NAME_LENGTH_MAX, then NAME_REGEX, each with the domain's message. A
string both too long and off the grammar gets the one length issue, as the
pipe stops at its first failing step; a value that is no string gets
fuz_schema's message. Its JSON Schema is maxLength and pattern.
label
the domain's label, capitalized, e.g. 'Role' or 'Scope-kind'
stringreturns
PipeSchema
the name schema