Skip to content

Real-time Validation

Real-time validation checks the email domain over AJAX while the user fills in a registration form, so they get feedback before submitting. It is enabled by default and can be turned off under Settings > Advanced.

  1. The user types an email into a registration form.
  2. The frontend script sends the address to the server over AJAX.
  3. The server checks it against your rules and returns whether the domain is allowed.
  4. The field shows visual feedback, and blocked attempts are recorded in the log with the source ajax_validation.

The frontend script and styles load on the front end whenever real-time validation is enabled. The script targets registration email fields, and the supported integrations also add their own hooks so validation reaches their forms. If a form is not covered, server-side validation still blocks a disallowed domain when the form is submitted.

The frontend stylesheet ships light and RTL variants and is enqueued automatically. Localized data is exposed to the script in the redw_ajax object (AJAX URL, nonce, translated messages, and an RTL flag). See the Developer Guide for the AJAX contract.