Skip to content
Zarex

Sign-ups with real contact details

Disposable addresses, domains without a mail server, typos, invalid or VoIP numbers: Zarex spots them when the form is submitted.

Scenario

DENY · denied

The domain is on the list of disposable mail services: denied. The response explains why, without ever containing the address.

Zarex responseDocs

{
  "decision_id": "c74d97b01eae257e44aa9d5bade97baf",
  "verdict": "DENY",
  "results": [
    {
      "rule_type": "EMAIL_VALIDATION",
      "verdict": "DENY",
      "is_dry_run": false,
      "reason": {
        "is_valid": true,
        "is_disposable": true,
        "is_free": false,
        "disposable_via": "list",
        "score": 100,
        "signals": [
          {
            "code": "DISPOSABLE_LIST",
            "points": 100
          }
        ],
        "denied": [
          "DISPOSABLE"
        ],
        "review": false
      }
    }
  ],
  "ruleset_version": "11.3.0+shield-2.0",
  "ip": {
    "country": "FR",
    "asn": "AS64507"
  }
}

What is checked on an address

The address format, the list of disposable mail services, whether the domain has a mail server, and common typos (with the suggested correction).

To check for a mail server, only a DNS query on the domain is made, never on the full address. The address is never stored: only the result appears in the log.

And on a phone number

The number is read against each country's official numbering plan: valid or not, mobile, landline or VoIP, and carrier when known.

You can reject VoIP or landline numbers, accept only some countries, or filter by carrier.

In your code

Both checks in a Server Action, or email only with Express.

"use server";
import { headers } from "next/headers";
import { createZarex, emailValidation, phoneValidation } from "@zarex/next";

const zarex = createZarex({
  key: process.env.ZAREX_KEY!,
  ipSource: "vercel",
  rules: [
    emailValidation({ deny: ["INVALID", "DISPOSABLE", "NO_MX", "TYPO"] }),
    phoneValidation({ deny: ["INVALID", "VOIP"] }),
  ],
});

export async function inscrire(email: string, phone: string) {
  const decision = await zarex.protect(
    { method: "POST", path: "/inscription", headers: await headers() },
    { email, phone }
  );
  if (decision.denied) return { ok: false };
  return { ok: true };
}

Ready for production

No address stored

Only the result is logged.

DNS on the domain only

Never on the full address.

Suggested correction

typo_suggestion in the decision.

Every country

Official numbering plans.

Other protections

Start by observing

Turn the rule on in DRY_RUN, watch the log, then switch to LIVE. A question before you start? Write to us.