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.