StringSchema extension type

A JSON Schema definition for a String.

on
Implemented types
Available extensions

Constructors

StringSchema({String? title, String? description, int? minLength, int? maxLength, String? pattern, String? defaultValue, StringFormat? format, @Deprecated('Use UntitledSingleSelectEnumSchema instead.') Iterable<String>? enumValues})
factory
StringSchema.fromMap(Map<String, Object?> _value)
const

Properties

allOf → List<Schema>?
Schema combinator that requires all sub-schemas to match.
no setterinherited
anyOf → List<Schema>?
Schema combinator that requires at least one of the sub-schemas to match.
no setterinherited
defaultValue → String?
The default value for this schema.
no setter
description → String?
A description of this schema.
no setterinherited
enumValues → Iterable<String>?
The allowed values for this String, corresponds to the enum key.
no setter
format → StringFormat?
The format of this String, corresponds to the format key.
no setter
maxLength → int?
The maximum allowed length of this String.
no setter
minLength → int?
The minimum allowed length of this String.
no setter
not → List<Schema>?
Schema combinator that requires none of the sub-schemas to match.
no setterinherited
oneOf → List<Schema>?
Schema combinator that requires exactly one of the sub-schemas to match.
no setterinherited
pattern → String?
A regular expression pattern that the String must match.
no setter
title → String?
A title for this schema, should be short.
no setterinherited
type → JsonType?
The JsonType of this schema, if present.
no setterinherited

Methods

validate(Object? data) → List<ValidationError>

Available on Schema, provided by the SchemaValidation extension

Validates the given data against this schema.