Start a new topic
Implemented

Add Webform Validation module

It would be great if clients could have more advanced rules to validate webform submissions. This issue came up where one client wanted to be able to check course numbers against a list of valid ones. Current cases supported by the validation include:


Numeric values

Verifies that user-entered values are numeric, with the option to specify min and / or max values. (textfield, hidden)

Minimum length

Verifies that a user-entered value contains at least the specified number of characters (textfield, textarea, email, hidden)

Maximum length

Verifies that a user-entered value contains at most the specified number of characters (textfield, textarea, email, hidden)

Minimum number of words

Verifies that a user-entered value contains at least the specified number of words (textfield, textarea, hidden)

Maximum number of words

Verifies that a user-entered value contains at most the specified number of words (textfield, textarea, hidden)

Equal values

Verifies that all specified components contain equal values (textfield, email, select, hidden)

Unique values

Verifies that all specified components contain unique values (textfield, email, select, hidden)

Specific value(s)

Verifies that the specified component contains a defined value (select, textfield, textarea, email, hidden)

Require at least one of two fields

Forces the user to specify / select at least one of two selected webform components (textfield, textarea, email, select)

Require at least one of several fields

Forces the user to specify / select at least one of several selected webform components (textfield, textarea, email, select)

Minimum number of selections required

Forces the user to select at least a defined number of options from the specified webform components (select)

Maximum number of selections allowed

Forces the user to select at most a defined number of options from the specified webform components (select)

Exact number of selections required

Forces the user to select exactly the defined number of options from the specified webform components (select)

Plain text (disallow tags)

Verifies that user-entered data doesn't contain HTML tags (textfield, textarea, email, hidden)

Regular expression

Validates user-entered text against a specified regular expression. Note: don't include delimiters such as /. (textfield, textarea, email, hidden)

Must be empty

Verifies that a specified textfield remains empty - Recommended use case: used as an anti-spam measure by hiding the element with CSS (textfield, hidden)

Words blacklist

Validates that user-entered data doesn't contain any of the specified illegal words (textfield, textarea, email, hidden)

Must match a username

Validates that user-entered data matches a username (textfield, hidden)


1 person likes this idea
Login to post a comment