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). Release: Video.js (HTML5 Video Player) 10.0.0-alpha1 First alpha version released for module videojs (10.0.0-alpha1). 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. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Webform Validation

13,065 sites Security covered Drupal 10–11 Webform ecosystem
View on drupal.org

This module adds validation rules to Webform fields, allowing you to enforce specific data requirements. It provides a set of predefined validation options and also allows developers to create custom validation rules.

This module adds an extra tab to each Webform node, allowing you to specify validation rules for your Webform components. You can create one or more of the predefined validation rules, and select which Webform component(s) should be validated against those. By using the hooks provided by this module, you can also define your own validation rules in your own modules.

How to use

When you edit any component of a supported type, near the bottom of the edit pane there will be a section called "Form extra validation" which contains the configuration.

Frequently asked questions

Q: Can I validate values against my own dataset, set of codes or database table?
A: You should create your own custom module which hooks into this module. See custom module example.
Q: Can i perform client-side (Javascript) validation with this module?
A: No you can't. Check out the clientside_validation module for this functionality.
Q: Can you help with my regular expression?
A: You can validate against a whole range of things using the regular expressions validation rules, so we cannot give examples for every use case. You could ask for some help in the issue queue with regards to your exact regular expression. There are already some examples available; have a look at Regular Expressions for Webform Validation (thx nfd) and regexlib.com for more examples.

Features overview

The following validation rules are currently included:

  • Equal values on multiple fields
  • Compare two fields
  • Require at least one of two fields
  • Require at least one of several fields

Not all the validators that were available in Drupal 7 have been implemented on Drupal 8+.

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Nov 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 2
Maintenance
Dormant

Releases

Version Type Core Release date
2.0.0 Stable 10–11 Dec 12, 2024
2.0.0-rc3 Pre-release 10–11 Nov 28, 2024