validator library

Validator library

This library provides a set of classes for validating data. For built in va

Classes

Field
An implementation of IdValidator, which acepts a list of validators.
IdValidator<T extends Result>
A Validator sub-class, which adds an identifier, which can be used to identify the validator, for example MapValidator uses it to validate its fields.
IValidator
Inmutable class from which all validators inherit.
IWhenValidator
A special type of validator that can operate on a parent map context. Used for conditional validation within an eskema map validator.
MapValidator<T extends Map>
Abstract class from which to create class based validator schemes. EskMap is a utility class designed to facilitate the validation and transformation of map-like data structures in Dart. It provides a flexible way to define validation rules and apply them to input data, ensuring that the data conforms to expected formats or constraints.
Validator<T extends Result>
An implementation of IValidator, which accepts a validator function, which is used by the EskValidator to validate some data.
WhenValidator

Typedefs

ValidatorFunction<T extends Result> = FutureOr<T> Function(dynamic value)
Type representing a validator function (may be sync or async).

Exceptions / Errors

AsyncValidatorException
Thrown when a synchronous validate() call encounters an async validator.
ValidatorFailedException