Black Friday+2x sites This week only: 2x sites on every Pro plan. Ends 28 Nov. See plans2x sites until 28 NovAgency Bundle $449 $1,499 Agency Bundle$1,499 $449 Ends in Getthe deal
Form extension · Pro

Elementor Form Validation with Regex: catch bad input early

Validation Pro adds your own regex rules and error messages to Animation Addons Form inputs and textareas in Elementor 4. Postcodes, order numbers and VAT IDs arrive in the format your team expects.

  • Regex rules on inputs and textareas
  • Your own error message per rule
  • Checked in the browser and on the server
  • Form runs on Elementor Free

The free Animation Addons Form already checks required fields, email, URL, number and phone formats and Min/Max values.

Animation Addons 4.2.23Updated

Demo variations

Five ways to use Validation Pro.

Five forms with regex rules from Validation Pro. Type a wrong value, send the form, then fix it and watch the message clear.

01

Order lookup for a bakery

Fix the order number and send the form. Input (Text) with regex ^BH-\d{5}$ and Required on, Input (Email) using the free email check, and a Textarea with Required. Starts with the message "Order numbers look like BH-12345."

02

Elementor postcode validation on a booking form

Type a full UK postcode, like SW1A 1AA. Input (Text) with Autofill set to Postal code, Required on and regex ^[A-Za-z]{1,2}\d[A-Za-z\d]?\s?\d[A-Za-z]{2}$. Starts with the message "Please enter a full UK postcode, like SW1A 1AA."

03

Elementor VAT number validation on an invoice form

Correct the VAT number, then try a PO number. Input (Text) with regex ^GB[0-9]{9}$, an optional Input (Text) with ^PO-[0-9]{4,8}$, and Input (Email) with the free format check. Starts with "VAT numbers start with GB followed by 9 digits."

04

Elementor promo code validation

Enter SPRING or AUTUMN followed by two digits. Input (Text) with Required on and regex ^(SPRING|AUTUMN)[0-9]{2}$. Starts with the message "That doesn't look like one of our codes. Check your email for SPRING or AUTUMN codes."

05

Elementor username validation on a sign-up

Use 3 to 20 lowercase letters, numbers or underscores. Input (Text) named user_name with regex ^[a-z0-9_]{3,20}$, and a Password (Pro) with Minimum length 8 and a confirm field using Must match field ID. Starts with "Use 3 to 20 lowercase letters, numbers or underscores."

Features

What you get with Validation Pro.

Every point below is a real control in the Validation Pro panel section or part of how it works. Nothing here needs custom code.

Any format your business uses

If you can describe a format as a regular expression, you can enforce it: reference numbers, postcodes, tax IDs, membership codes.

Messages in your own words

Visitors read a message that tells them the fix, not a generic error, so fewer give up.

Checked twice: browser and server

The rule runs in the browser for instant feedback, then the server repeats it before saving or running email, webhook and redirect actions. Bypassing the browser check doesn't help.

Accessible error handling

Failed fields get aria-invalid and are linked to their message with aria-describedby, and focus moves to the first invalid field, so keyboard and screen-reader users know exactly what to fix.

Respects conditional fields

Fields hidden by Conditional Display (Pro) are skipped, so a delivery-only postcode rule never blocks a collection order.

Step by step

How to add Validation Pro in Elementor 4

Five steps from switching it on to publishing. The bold names are the exact labels you will see on screen.

Get Pro from $24.50
  1. In WordPress, go to Animation Addon › Settings › Extensions and check that Validation Pro is switched on (it requires the Form widget).

  2. Edit your page in Elementor 4 and add the Animation Addons Form widget, or open an existing one.

  3. Select an Input or Textarea field and set the basics in Content: Type, Required and, if you like, a field-level Error message.

  4. In the field's Validation Pro settings, enter your regex pattern and the message visitors should see when it doesn't match.

  5. Open Preview, try a valid and an invalid value, then publish.

Who it's for

Who uses Validation Pro?

The people who get the most out of it, and what they use it for.

  • Shops

    That look up orders by reference number.

  • Clinics and local services

    That only cover certain postcodes.

  • B2B SaaS and fintech teams

    Collecting VAT or company numbers for invoices.

FAQ

Questions about Validation Pro

How do I add regex to an Elementor form?

Use the Animation Addons Form in Elementor 4 and turn on Validation Pro (Animation Addons Pro). Select an Input or Textarea field, enter your regex pattern and the message visitors should see, then test in Preview. This Elementor form validation regex rule is checked in the browser and again on the server, so invalid values are never stored or emailed.

Can I set a custom error message?

Yes. The free Animation Addons Form has an Error message control on every field, shown when the field is empty, in the wrong format or out of range. Validation Pro adds an Elementor custom validation message for each regex rule, so a visitor sees "Order numbers look like BH-12345" rather than a generic Elementor form error message.

How do I validate a phone number?

The free Animation Addons Form checks the basic shape of Tel fields: digits, spaces, brackets, dashes and an optional plus sign. For stricter Elementor phone number validation, such as UK mobiles only, add a Validation Pro regex like ^07\d{9}$ with a message explaining the format. The free check runs first, then your pattern.

Is it checked on the server?

Yes, both. That makes it Elementor form server side validation as well as a browser check. Validation Pro runs your pattern in the browser for instant feedback and repeats it on the server before the submission is saved or any email, webhook or redirect action runs, so a visitor who bypasses the browser is still rejected.

Which fields does it work on?

Input fields (text, email, number, tel, URL) and Textareas inside the Animation Addons Form, not Elementor's Atomic Form. That covers Elementor form field validation for free-text answers; Select, Radio and Checkbox already limit answers, and Password has Minimum length. It needs an active Animation Addons Pro licence, and rules run on the live page and in Preview, not on the editor canvas.

Do I need Elementor Pro for it?

No. The Animation Addons Form and its built-in checks run on Elementor Free, so Elementor 4 form validation does not need Elementor Pro. Validation Pro needs Animation Addons Pro, not Elementor Pro. Elementor's own Atomic Form is the one that requires Elementor Pro, which is why many Elementor Free sites use the Animation Addons Form.

Will it slow the page or hurt SEO?

No. Validation Pro runs inside the Animation Addons form runtime, which loads the form's script and styles only on pages that contain a form, and it hooks into that form's existing validation step. The form remains real HTML, so search engines read the page as usual.

What about conditionally hidden fields?

They are skipped. Fields hidden by Conditional Display (Pro) are never validated, so a delivery-only postcode rule never blocks a collection order. Your regex rule also runs only after the built-in checks pass, so a required field left empty shows its own Error message first, before the pattern is tested.

Is it accessible to keyboard users?

Yes. Failed fields get aria-invalid and are linked to their message with aria-describedby, and focus moves to the first invalid field. Keyboard and screen-reader users therefore hear exactly what to fix. The demos above behave the same way: try submitting one with a wrong value and listen for, or look at, the message.

How do I match a UK postcode or VAT ID?

Write each Elementor form regex pattern as a regular expression and add it to the field. For Elementor postcode validation use ^[A-Za-z]{1,2}\d[A-Za-z\d]?\s?\d[A-Za-z]{2}$, and for Elementor VAT number validation use ^GB[0-9]{9}$. Keep patterns to plain character classes, \d and {n,m}, so browser and server agree.

More answers in the FAQ · Documentation · Free vs Pro

Animation Addons Pro · Elementor 4

Get the data right the first time.

Your own regex rules and messages on Elementor 4 form fields, checked in the browser and on the server.

Black Friday dealup to 50% off every Pro planEnds 10 Dec

  • 15-day money-back guarantee
  • Rated 4.6 / 5 on WordPress.org
  • No Elementor Pro needed
  • Elementor 3 & 4 in one license