Skip to main content

Async validation (planned)

Async validation is a common requirement for real-world forms, such as:

  • checking username or email availability
  • validating coupon or promo codes
  • verifying values against a server

However, async validation is not supported in the current stable version of Formora.


Why async validation is hard

Async validation introduces several complex problems:

  • results can resolve out of order
  • stale responses can overwrite newer state
  • loading indicators must stay consistent
  • array operations (add / remove / reorder) can invalidate in-flight requests

Handling these cases correctly requires careful design.


Current status

As of the current release:

  • ❌ No validateAsync
  • ❌ No validating meta state
  • ❌ No debouncing support
  • ❌ No async-safe field array handling

Formora intentionally avoids exposing a partial or unsafe async API.


Roadmap

Async validation is planned for a future major release.

When introduced, it will:

  • prevent stale async results from overwriting newer values
  • work correctly with conditional fields
  • behave safely inside field arrays
  • expose a clear and minimal API

Until then, all validation in Formora is synchronous.


What to do today

If you need async checks right now:

  • perform them inside your submit handler
  • or trigger them manually outside of Formora

This keeps your form behavior predictable and avoids race conditions.


Summary

  • Async validation is not supported yet
  • Synchronous validation is the only supported model today
  • A safe async API will be added in a future release

This page exists to set correct expectations and avoid confusion.