The form-specific validations
This is a list of the default form-specific validations stored in the module.
Validations are programmatically hard-coded conditions that specify whether the information entered in a field of a web form is a valid value. The Web Forms for Marketers module contains two kinds of form validations, form-specific and field type, but you can also create custom ones.
Form-specific validations stay with the field regardless of the type of field and make it easy to add the most frequently used types of validations to the fields in your form. The rules governing the validation are displayed in the Regular Expression field. These regular expressions are fixed and cannot be modified unless you choose the Custom validation.
![]() |
Validation | Description | Default Regular Expression | |
---|---|---|---|
Numbers only | Checks whether the values entered are numbers. | ^[-,+]{0,1}\d*\.{0,1}\d+$ | |
Security Risk | Checks the field input for content that may be malicious, for example code script. | ^((?!([<&][\S])).)*$ | |
Letters only | Checks whether the values entered are letters. | ^[a-zA-Z]*$ | |
Special Character must not be included | Checks whether the field contains only letters and whitespaces. | ^[a-zA-Z\s]*$ | |
Number and word characters | Checks whether the field contains only numbers, letters or whitespaces. | ^[\w\s]*$ | |
Email address | Checks whether the value entered uses the format of an email address. | ^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$ | |
Custom | Custom | You can enter your own regular expression. |