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

Supporting organizations:
8.x branch maintenance
Supporting Development and Maintenance

Project information

Releases

3.0.0-beta7 released 12 June 2026
Works with Drupal: ^10.2 || ^11
Install:

Development version: 3.0.x-dev updated 21 May 2026 at 14:53 UTC

8.x-1.1 Stable release covered by the Drupal Security Team released 27 July 2023
Works with Drupal: ^9 || ^10
Install:

Development version: 8.x-1.x-dev updated 26 Mar 2024 at 14:36 UTC