refineAsync method

Schema<T> refineAsync(
  1. Future<bool> validator(
    1. T value
    ), {
  2. String? message,
  3. String? code,
})

Creates a new schema that applies async validation

The async refinement function should return true if the value is valid, false otherwise.

Implementation

Schema<T> refineAsync(
  Future<bool> Function(T value) validator, {
  String? message,
  String? code,
}) {
  return AsyncRefineSchema<T>(this, validator, message: message, code: code);
}