String Validator
A schema specifying constraints on a string node.
A node will be valid against the schema if it is a string that
meets the schemas minLength
, maxLength
and pattern
properties.
Analogous to the JSON Schema string
validation type.
Properties
The StringValidator
type has these properties:
Name | Description | Type | Inherited from | JSON-LD @id |
Aliases |
---|---|---|---|---|---|
id |
The identifier for this item. | String |
Entity |
schema:id |
- |
minLength |
The minimum length for a string node. | Integer |
- | stencila:minLength |
min-length , min_length |
maxLength |
The maximum length for a string node. | Integer |
- | stencila:maxLength |
max-length , max_length |
pattern |
A regular expression that a string node must match. | String |
- | stencila:pattern |
- |
Related
The StringValidator
type is related to these types:
- Parents:
Entity
- Children: none
Formats
The StringValidator
type can be encoded (serialized) to, and/or decoded (deserialized) from, these formats:
Format | Encoding | Decoding | Support | Notes |
---|---|---|---|---|
DOM HTML | 🟢 No loss | |||
HTML | 🔷 Low loss | |||
JATS | ||||
Markdown | ⚠️ High loss | Encoded using implemented function | ||
Stencila Markdown | ⚠️ High loss | |||
Quarto Markdown | ⚠️ High loss | |||
MyST Markdown | ⚠️ High loss | |||
LLM Markdown | ⚠️ High loss | |||
LaTeX | 🔷 Low loss | 🔷 Low loss | ||
🔷 Low loss | ||||
Plain text | ⚠️ High loss | |||
IPYNB | 🔷 Low loss | 🔷 Low loss | ||
Microsoft Word DOCX | 🔷 Low loss | 🔷 Low loss | ||
OpenDocument ODT | 🔷 Low loss | 🔷 Low loss | ||
TeX | 🔷 Low loss | 🔷 Low loss | ||
JSON | 🟢 No loss | 🟢 No loss | ||
JSON+Zip | 🟢 No loss | 🟢 No loss | ||
JSON5 | 🟢 No loss | 🟢 No loss | ||
JSON-LD | 🟢 No loss | 🟢 No loss | ||
CBOR | 🟢 No loss | 🟢 No loss | ||
CBOR+Zstandard | 🟢 No loss | 🟢 No loss | ||
YAML | 🟢 No loss | 🟢 No loss | ||
Lexical JSON | 🔷 Low loss | 🔷 Low loss | ||
Koenig JSON | 🔷 Low loss | 🔷 Low loss | ||
Pandoc AST | 🔷 Low loss | 🔷 Low loss | ||
Directory | ||||
Stencila Web Bundle | ||||
Debug | 🔷 Low loss |
Bindings
The StringValidator
type is represented in:
- JSON-LD
- JSON Schema
- Python class
StringValidator
- Rust struct
StringValidator
- TypeScript class
StringValidator
Source
This documentation was generated from StringValidator.yaml
by docs_types.rs
.