Title: Regex Validation for Gravity Forms
Author: Daniel Sturm
Published: <strong>25, Febreru de 2026</strong>
Last modified: 25, Febreru de 2026

---

Guetar plugins

![](https://ps.w.org/regex-validation-for-gravity-forms/assets/banner-772x250.png?
rev=3469406)

![](https://ps.w.org/regex-validation-for-gravity-forms/assets/icon.svg?rev=3469406)

# Regex Validation for Gravity Forms

 By [Daniel Sturm](https://profiles.wordpress.org/dsturm/)

[Download](https://downloads.wordpress.org/plugin/regex-validation-for-gravity-forms.zip)

 * [Details](https://ast.wordpress.org/plugins/regex-validation-for-gravity-forms/#description)
 * [Reviews](https://ast.wordpress.org/plugins/regex-validation-for-gravity-forms/#reviews)
 *  [Installation](https://ast.wordpress.org/plugins/regex-validation-for-gravity-forms/#installation)
 * [Development](https://ast.wordpress.org/plugins/regex-validation-for-gravity-forms/#developers)

 [Support](https://wordpress.org/support/plugin/regex-validation-for-gravity-forms/)

## Description

**Regex Validation for Gravity Forms** adds a powerful regex validation option to
your Gravity Forms fields. Define custom regular expression patterns or choose from
built-in presets to validate user input — both server-side and client-side.

#### Features

 * **Custom regex patterns** — Add any regular expression to validate field input
 * **Unicode support** — Full Unicode character class support (`\p{L}`, `\p{N}`)
   for international names and text
 * **Built-in presets** — Quick-select common patterns for names, emails, phone 
   numbers, and more
 * **Server-side validation** — Secure PHP validation that can’t be bypassed
 * **Client-side validation** — Instant feedback on input change using JavaScript
 * **Compound field support** — Works with Name fields (validates each sub-input
   individually)
 * **Custom error messages** — Define user-friendly validation messages per field
 * **Extensible** — Add your own presets and field types via filters
 * **Accessible** — Error messages use `role="alert"` for screen readers

#### Supported Field Types

 * Text
 * Name (with individual sub-input validation)
 * Email
 * Phone
 * Website
 * Textarea

#### Built-in Presets

 * **Name** — Unicode letters, spaces, hyphens, apostrophes
 * **Email** — RFC 5322 compliant
 * **US Phone Number** — Common US formats
 * **International Phone Number** — E.164 format
 * **Alphanumeric** — Unicode letters and numbers only
 * **No Special Characters** — Unicode letters, numbers, and spaces only

## Installation

#### From WordPress Admin

 1. Upload the `regex-validation-for-gravity-forms` folder to `/wp-content/plugins/`
 2. Activate the plugin through the ‘Plugins’ menu in WordPress

#### Via Composer

    ```
    composer require zirkeldesign/regex-validation-for-gravity-forms
    ```

#### Requirements

 * WordPress 6.0 or later
 * PHP 8.2 or later
 * Gravity Forms 2.5 or later

## FAQ

### How do I add a regex pattern to a field?

Edit your form in Gravity Forms, select a supported field, and look for the “Regex
Validation” section under the field settings. You can either select a preset pattern
or enter your own custom regex.

### Does it support Unicode characters?

Yes! All patterns use the `/u` flag for PHP and the `u` flag for JavaScript regex,
enabling full Unicode property support like `\p{L}` for any letter in any language.

### Can I add my own presets?

Yes, use the `gf_regex_validation_presets` filter:

    ```
    add_filter('gf_regex_validation_presets', function (array $presets): array {
        $presets['zip_code'] = [
            'label'   => 'US Zip Code',
            'pattern' => '/^\d{5}(-\d{4})?$/',
            'message' => 'Please enter a valid US zip code.',
        ];

        return $presets;
    });
    ```

### Can I add support for additional field types?

Yes, use the `gf_regex_validation_field_types` filter:

    ```
    add_filter('gf_regex_validation_field_types', function (array $types): array {
        $types[] = 'number';

        return $types;
    });
    ```

### Is client-side validation secure?

Client-side validation provides instant user feedback but should never be relied
upon for security. This plugin always performs server-side validation as well, which
cannot be bypassed.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Regex Validation for Gravity Forms” is open source software. The following people
have contributed to this plugin.

Contributors

 *   [ Daniel Sturm ](https://profiles.wordpress.org/dsturm/)
 *   [ dsturm ](https://profiles.wordpress.org/dsturm-1/)

[Translate “Regex Validation for Gravity Forms” into your language.](https://translate.wordpress.org/projects/wp-plugins/regex-validation-for-gravity-forms)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/regex-validation-for-gravity-forms/),
check out the [SVN repository](https://plugins.svn.wordpress.org/regex-validation-for-gravity-forms/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/regex-validation-for-gravity-forms/)
by [RSS](https://plugins.trac.wordpress.org/log/regex-validation-for-gravity-forms/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.2

 * Fixed: Admin field settings not appearing in Gravity Forms editor
 * Improved: Code quality and WordPress coding standards compliance
 * Enhanced: Development tooling for better maintainability

#### 1.0.1

 * Fixed: WordPress Plugin Check compliance issues
 * Improved: Security and code standards

#### 1.0.0

 * Initial release
 * Server-side and client-side regex validation
 * Built-in presets for common patterns
 * Unicode support with `\p{L}` and `\p{N}` character classes
 * Name field compound input support
 * Extensible via `gf_regex_validation_presets` and `gf_regex_validation_field_types`
   filters

## Meta

 *  Version **1.0.3**
 *  Last updated **2 meses ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.0 or higher **
 *  Tested up to **6.9.4**
 *  PHP version ** 8.3 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/regex-validation-for-gravity-forms/)
 * Tags
 * [gravity forms](https://ast.wordpress.org/plugins/tags/gravity-forms/)[pattern](https://ast.wordpress.org/plugins/tags/pattern/)
   [regex](https://ast.wordpress.org/plugins/tags/regex/)[unicode](https://ast.wordpress.org/plugins/tags/unicode/)
   [validation](https://ast.wordpress.org/plugins/tags/validation/)
 *  [Advanced View](https://ast.wordpress.org/plugins/regex-validation-for-gravity-forms/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/regex-validation-for-gravity-forms/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/regex-validation-for-gravity-forms/reviews/)

## Contributors

 *   [ Daniel Sturm ](https://profiles.wordpress.org/dsturm/)
 *   [ dsturm ](https://profiles.wordpress.org/dsturm-1/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/regex-validation-for-gravity-forms/)