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