Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Field Validation

14,795 sites Security covered
View on drupal.org

This module provides a variety of configurable validation rules for your Drupal fields, including checks for email format, minimum/maximum length, specific patterns, numeric ranges, and uniqueness. It also offers advanced options like validation against other fields, custom PHP code, and a blacklist for specific words, with an additional submodule offering even more validation types.

This module provides a collection of configurable validation rules for your field instances.

Available validators




7.x 8.x Color (HTML5) ✓ (*) Date range ✓ ✓ Date (ISO) ✓ (*) EAN number ✓ (*) Email ✓ ✓ Equal values on multiple fields ✓ ✓ Field collection unique ✓ (*) Integer values ✓ (*) ✓ IP Address ✓ (*) ✓ Length (optionally specify min and / max length) ✓ ✓ Match against a field ✓ ✓ Match against a property ✓ Must be empty (Anti-Spam: hide with CSS) ✓ ✓ Number of words (optionally specify min / max words) ✓ ✓ Numeric values (optionally specify min / max value) ✓ ✓ Numeric (HTML5, with min / max / step options) ✓ (*) Pattern (regular expression lite) ✓ ✓ Phone ✓ (*) ✓ PHP code (powerfull but dangerous) ✓ Plain text (disallow tags) ✓ ✓ Postal code (depend on Postal Code Validation, support Address Field) ✓ (*) Regular expression ✓ ✓ Regular expression (Perl-Compatible) ✓ (*) Require at least one of several fields ✓ ✓ Require some of several fields ✓ (*) Required field ✓ (*) Specific value(s) ✓ ✓ Unique ✓ ✓ Unique values on multiple fields ✓ URL (support internal path and external URL validation) ✓ ✓ Words blacklist ✓ ✓

(*) = provided by the (included) field_validation_extras submodule in 7.x

Since 7.x-2.1, we add another sub module property validation which could solve validation issues for property(non-field), such as title, Ubercat SKU, list_price.

Drupal 8, 9, 10

You need clear the cache if it is not works correctly

In Drupal 8, validators are plugins, you can program your own validator or extend some of the existing.

3.0.x version allow you add Drupal'core constraint to field by UI. it support 40+ symfony constraints. Callback allow you write custom code, Expression allow you use twig-like expression...

Update from 8.x-1.x to 3.0.0

Requirements

7.x

8.x

Just Drupal core.

Documentation

Related modules

Drupal Slack channel: #field_validation

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

2 tracked projects depend on this one

Activity

Tracked releases
4
Tracked since
Nov 2024
Latest release
2 months ago
Releases (12 mo)
3 ▲ from 1
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
3.0.0-beta7 Pre-release 10–11 Jun 12, 2026
3.0.0-beta6 Pre-release 10–11 Oct 7, 2025
3.0.0-beta5 Pre-release 10–11 Sep 17, 2025
3.0.0-beta4 Pre-release 10–11 Nov 13, 2024