withPreprocess<TNextInput> method
ValidasiEngine<T, TNextInput>
withPreprocess<TNextInput>(
- TransformFn<
TNextInput, T> transform, { - String? message,
Implementation
ValidasiEngine<T, TNextInput> withPreprocess<TNextInput>(
TransformFn<TNextInput, T> transform,
{String? message}) {
final wrappedPreprocess = ValidasiTransformation<dynamic, T>(
(input) => transform(input),
message: message,
);
return ValidasiEngine<T, TNextInput>(
rules: rules,
preprocess: wrappedPreprocess,
);
}