AsyncRefineValidator<T> class
Async refine layer — requires ValidatorExtensions.safeParseAsync.
- Inheritance
- Implemented types
- Available extensions
Constructors
Properties
-
customPath
→ List<
String> ? -
no setter
- errorCode → String
-
no setter
- errorMessage → String?
-
no setter
-
errorParams
→ Map<
String, dynamic> ? -
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
inner
→ Validator<
T> -
no setter
- isCompiled → bool
-
True when this validator was produced by compile / ValidatorCompiler.
no setteroverride
- isPure → bool
-
True when no rules, transforms, or wrappers are attached.
no setterinherited
- isSecret → bool
-
finalinherited
-
predicate
→ Future<
bool> Function(T value) -
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
compile(
) → Validator< T> -
12.3 — compiles into a cached, optimized validator tree.
inherited
-
compile(
) → Validator< T> -
Available on Validator<
12.3 — compiles this schema into a cached, optimized validator tree.T> , provided by the CompileExtension extension -
defaultValue(
T value) → DefaultDecorator< T> -
Available on Validator<
Deprecated — use withDefault.T> , provided by the DefaultExtension extension -
getFieldSchema(
String key) → Validator? -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
nullable(
) → NullableValidator< T> -
Available on Validator<
Makes the validator nullable, allowing null valuesT> , provided by the NullableExtension extension -
optional(
) → OptionalValidator< T> -
Available on Validator<
T> , provided by the OptionalExtension extension -
parse(
dynamic value, {bool? abortEarly}) → T -
Available on Validator<
ValidatesT> , provided by the ValidatorExtensions extensionvalueand returns data, or throws ValidationException. -
parseAsync(
dynamic value, {bool? abortEarly}) → Future< T> -
Available on Validator<
T> , provided by the ValidatorExtensions extension -
refine(
bool predicate(T value), {List< String> ? path, String? code, String? message, Map<String, dynamic> ? params}) → Validator<T> -
Available on Validator<
Custom predicate on any schema (objects and leaf primitives).T> , provided by the RefineExtension extension -
refineAsync(
Future< bool> predicate(T value), {List<String> ? path, String? code, String? message, Map<String, dynamic> ? params}) → AsyncRefineValidator<T> -
Available on Validator<
Async variant of refine; use with safeParseAsync.T> , provided by the RefineExtension extension -
safeParse(
dynamic value, {bool? abortEarly}) → ParseResult< T> -
Available on Validator<
ValidatesT> , provided by the ValidatorExtensions extensionvaluewithout throwing. -
safeParseAsync(
dynamic value, {bool? abortEarly}) → Future< ParseResult< T> > -
Available on Validator<
Async parse — required for schemas with refineAsync / superRefineAsync / LazyValidator wrapping async inners.T> , provided by the ValidatorExtensions extension -
secret(
) → AsyncRefineValidator< T> -
override
-
stopOnFirstError(
) → Validator< T> -
override
-
strict(
) → Validator< T> -
override
-
superRefine(
void callback(T value, SuperRefineContext ctx)) → Validator< T> -
Available on Validator<
Zod-compatibleT> , provided by the SuperRefineExtension extension.superRefine()— attach multiple custom issues. -
superRefineAsync(
Future< void> callback(T value, SuperRefineContext ctx)) → AsyncSuperRefineValidator<T> -
Available on Validator<
Async variant of superRefine; use with safeParseAsync.T> , provided by the SuperRefineExtension extension -
toString(
) → String -
A string representation of this object.
inherited
-
transform<
R> (R cb(T value)) → Validator< R> -
inherited
-
validate(
dynamic value, {FlodPath path = const FlodPath([]), bool? abortEarly}) → ParseResult< T> -
override
-
validateAsync(
dynamic value, {FlodPath path = const FlodPath([]), bool? abortEarly}) → Future< ParseResult< T> > -
override
-
withDefault(
T value) → DefaultDecorator< T> -
Available on Validator<
Zod-compatible default when input is missing/T> , provided by the DefaultExtension extensionnull. -
withDefaultFactory(
T create()) → DefaultDecorator< T> -
Available on Validator<
Factory default —T> , provided by the DefaultExtension extensioncreateruns on every missing/nullinput.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited