schema-components - v3.7.0
    Preparing search index...

    Function extractStringConstraints

    • Read the JSON Schema string constraint keywords (minLength, maxLength, pattern, format, contentEncoding, contentMediaType) from a schema node and return them in the StringConstraints shape consumed by string field renderers. Emits an unknown-format diagnostic for unrecognised format values.

      Parameters

      • schema: Record<string, unknown>
      • Optionaldiagnostics: DiagnosticsOptions
      • pointer: string = ""

      Returns StringConstraints