dzod library

Classes

ArraySchema<T>
Schema for validating array values with element validation
AsyncRefineSchema<T>
Schema that applies async validation
AsyncTransformSchema<T, R>
Schema that applies an async transformation after validation
BooleanSchema
Schema for validating boolean values
Branded<T, B>
Branded type wrapper for nominal typing
BrandedSchema<T, B>
Schema that creates branded types for nominal typing
Coerce
Coercion factory methods
CoercionSchema<T>
Schema for automatic type coercion during validation
CoercionUtils
Coercion utilities for common type conversions
ComputedDefaultSchema<T>
Schema that provides a computed default value
ComputedFallbackSchema<T>
Schema that provides a computed fallback value
DefaultSchema<T>
Schema that provides a default value
DescribeSchema<T>
Schema that adds description and metadata
DiscriminatedUnionSchema<T>
Schema for discriminated union validation (tagged union)
DZod
Convenience class that provides factory methods for creating schemas
Either<L, R>
Simple Either-like structure for functional programming patterns
EnumSchema<T>
Schema for validating enum values from a predefined set of options
ErrorContext
Enhanced error context tracking and path management
ErrorContextBuilder
Utility class for building error contexts
ErrorContextManager
Global error context management
ErrorFormatConfig
Configuration for error formatting and customization
ErrorFormatPresets
Predefined error format configurations
ErrorFormatter
Global error formatting and customization system
ErrorMessages
Global error message customization
ErrorProcessor
Advanced error filtering and grouping with chaining support
ErrorUtils
Comprehensive error filtering and grouping utilities
FallbackSchema<T>
Schema that provides a fallback value
IntersectionSchema<T>
Schema that validates against multiple schemas (intersection)
JsonSchemaConfig
Configuration for JSON Schema generation
JsonSchemaContext
Context for JSON Schema generation
JsonSchemaGenerator
JSON Schema generator for dzod schemas
LazySchema<T>
Schema that is lazy (evaluated only when needed)
NullSchema
Schema for validating null values
NumberSchema
Schema for validating number values
ObjectSchema
Schema for validating object structures with comprehensive manipulation methods
OptionalSchema<T>
Schema that makes the value optional (nullable)
Parser
Utility class for parsing and validation operations
PipelineSchema<TInput, TOutput>
Schema for multi-stage validation with chaining support
PostprocessSchema<T>
Schema that postprocesses the output
PreprocessSchema<T, R>
Schema that preprocesses the input
Readonly<T>
Readonly wrapper that prevents modification
ReadonlySchema<T>
Schema that creates readonly values
RecordSchema<K, V>
Schema for validating record (key-value) structures with typed keys and values
RecursiveSchema<T>
Enhanced recursive schema with circular reference detection and handling
RefineSchema<T>
Schema that applies additional validation
Schema<T>
Base class for all schemas in dzod
SchemaComposer
Schema composition and analysis utilities
SchemaInfo
Schema information extracted from introspection
SchemaUtils
Utility functions for schema composition
StringSchema
Schema for validating string values
TransformSchema<T, R>
Schema that applies a transformation after validation
TupleSchema<T extends List>
Schema for validating tuple values with fixed-length and typed elements
UnionSchema<T>
Schema that validates against multiple schemas (union)
ValidationContext
Context for tracking validation state during recursion
ValidationError
Represents a validation error with detailed information
ValidationErrorCodeUtils
Utility class for working with validation error codes
ValidationErrorCollection
Collection of validation errors
ValidationFailure<T>
Failed validation result
ValidationResult<T>
Represents the result of a validation operation
ValidationResultWithStats<T>
Validation result with additional recursion statistics
ValidationSuccess<T>
Successful validation result

Enums

JsonSchemaVersion
JSON Schema specification version
ObjectMode
Mode for handling unknown properties in object validation
ValidationErrorCode
Standardized error codes for validation failures

Extensions

DiscriminatedUnionExtension on Schema
Factory methods for creating discriminated unions
EnumFactories on Never
Factory methods for creating common enum schemas
ErrorContextExtensions on ValidationError
Extension methods for enhanced error context support
JsonSchemaExtension on Schema
Extension to add JSON Schema generation to Schema class
ObjectFactories on Never
Factory methods for creating common object schemas
ParserExtensions on Schema<T>
Extension methods for easier parsing
PipelineExtension on Schema
Factory methods for creating pipeline schemas
RecordFactories on Never
Factory methods for creating common record schemas
RecursiveExtension on Schema
Factory methods for creating recursive schemas
SchemaCompositionExtension on Schema
Extension to add composition utilities to Schema class
TupleFactories on Never
Factory methods for creating common tuple schemas
ValidationErrorCollectionExtensions on ValidationErrorCollection
Extension on ValidationErrorCollection to provide detailed error information
ValidationErrorCollectionFormatting on ValidationErrorCollection
Extension methods for ValidationErrorCollection to support custom formatting
ValidationErrorFormatting on ValidationError
Extension methods for ValidationError to support custom formatting
ValidationResultExtensions on ValidationResult<T>
Extension on ValidationResult to provide human-readable output

Properties

dzod DZod
no setter
z DZod
no setter

Typedefs

ErrorComparator = int Function(ValidationError a, ValidationError b)
Type definition for error sorting functions
ErrorContextFormatter = Map<String, dynamic> Function(ValidationError error)
Type definition for custom error context formatters
ErrorFilter = bool Function(ValidationError error)
Type definition for error filter functions
ErrorGroupingFunction<T> = T Function(ValidationError error)
Type definition for error grouping functions
ErrorMessageFormatter = String Function(ValidationError error)
Type definition for custom error message formatters
ParserFunction<T> = ValidationResult<T> Function(dynamic input, [List<String> path])
Function type for custom parsers

Exceptions / Errors

ValidationException
Exception thrown when unwrapping a failed validation result