Regex Validation for Gravity Forms
·
Adds custom regex validation with Unicode support and presets to Gravity Forms fields.
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)
- 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
