How to validate phone numbers on Webflow forms with a lookup API and Webflow Cloud
Blog post from Webflow
Phone input patterns can catch formatting errors but cannot determine whether a number is actually assignable, so the guide describes building a Next.js POST validation route on Webflow Cloud that checks E.164 formatting and calls a third-party phone lookup provider without exposing its API key to the browser. It requires a Webflow form with specific identifiers, a Webflow Cloud-compatible Next.js app using npm, provider credentials, environment-variable access, and exact allowed form origins. The route validates request origins, normalizes numbers, rejects malformed inputs before provider calls, maps provider-specific responses to a simple validity verdict, and treats configuration or provider failures as pass-through conditions to avoid losing leads. A capture-phase page script intercepts submissions, displays errors only for malformed or invalid numbers, and resubmits valid or temporarily unverifiable entries through Webflow’s normal flow. The guide also covers environment configuration, mount-path handling, end-to-end tests, usage and rate-limit considerations, JavaScript-disabled limitations, and common failures such as unsupported Next.js edge runtime directives, incorrect mount paths, origin mismatches, and scripts that do not intercept submissions.
| Trend | Post Mentions | Total Month Mentions | Posts | Companies | MoM |
|---|---|---|---|---|---|
| Edge Computing | 5 | 107 | 30 | 11 | +20% |
| Secrets Management | 1 | 2,195 | 470 | 125 | +7% |
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.