validateAsync method

Future<bool> validateAsync({
  1. bool debounce = false,
})

Runs asynchronous validation across all registered controls concurrently.

Awaits all controls including nested BloomFormGroup and BloomFieldArray instances. Returns true if every control passed validation; false otherwise.

final isValid = await loginForm.validateAsync();
if (isValid) {
  // proceed
}

Implementation

Future<bool> validateAsync({bool debounce = false}) async {
  final results = await Future.wait(
    _fields.values.map((field) => field.validateAsync(debounce: debounce)),
  );
  return results.every((valid) => valid);
}