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.
This schema type is marked as unstable ⚠️ and is subject to change.
Properties
Name | @id | Type | Description | Inherited from |
---|---|---|---|---|
id | schema:id | string | The identifier for this item. | Entity |
maxLength | stencila:maxLength | integer | The maximum length for a string node. See note 1. | StringValidator |
meta | stencila:meta | object | Metadata associated with this item. | Entity |
minLength | stencila:minLength | integer | The minimum length for a string node. See note 2. | StringValidator |
pattern | stencila:pattern | string | A regular expression that a string node must match. See note 3. | StringValidator |
Notes
- maxLength : A string is valid if its length is less than, or exactly equal to,
maxLength
. - minLength : A string is valid if its length is greater than, or exactly equal to,
minLength
. - pattern : A string is valid if it is matched by the regular expression.
Related
- Parent: Validator
- Descendants: None
Available as
- JSON-LD
- JSON Schema
- Python
class StringValidator
- TypeScript
interface StringValidator
- R
class StringValidator
- Rust
struct StringValidator
Source
This documentation was generated from StringValidator.schema.yaml.