Advanced

Async / Remote Validation

Validate against a server endpoint — check username availability, email uniqueness, and more.

Registration with Async Checks
Try "admin", "test", or "demo" to see a "taken" error.
Try "admin@example.com" to see a "taken" error.
How It Works

Async validation sends the field value to a remote URL and checks the response. A loading spinner is shown while waiting. The response must be JSON with a valid boolean.

Attributes
  • data-ev-remote — Endpoint URL
  • data-ev-remote-method — GET or POST (default: POST)
  • data-ev-remote-debounce — Debounce delay in ms
  • data-ev-msg-remote — Custom error message
Code Example
<input type="text" data-ev-type="username" data-ev-remote="/api/check-username" data-ev-remote-method="GET" data-ev-remote-debounce="500" data-ev-msg-remote="Username is taken" />
Expected Response
{ "valid": true } // or { "valid": false, "message": "Username taken" }
Demo Note: This demo uses simulated async validation (client-side setTimeout). In production, use real API endpoints.