When to use validation: Add validation rules when you need to enforce specific formats (like phone numbers or ID codes) or business rules (like age ranges or character limits).
Validation Types
Wizflow provides 8 built-in validation types to cover common validation scenarios.Regex Pattern
Use case: Custom format validation (phone numbers, postal codes, IDs)
Commonly used with: Text, Text Area, Number
Commonly used with: Text, Text Area, Number
Range Validation (InRange)
Use case: Ensure numbers fall within min/max bounds
Commonly used with: Number, Amount, Age, Year
Commonly used with: Number, Amount, Age, Year
Length Validation (LengthInRange)
Use case: Enforce minimum or maximum character counts
Commonly used with: Text, Text Area
Commonly used with: Text, Text Area
No Duplicate Value
Use case: Prevent repeated entries across a flow
Commonly used with: All input types
Commonly used with: All input types
CPR Validation
Use case: Validate Danish CPR number format
Commonly used with: Text, Formatted Number
Commonly used with: Text, Formatted Number
CPR Modulus 11
Use case: Strict CPR validation with modulus 11 checksum
Commonly used with: Text, Formatted Number
Commonly used with: Text, Formatted Number
Choices Validation
Use case: Ensure valid selection in choice entities
Commonly used with: Choice, Multi-choice
Commonly used with: Choice, Multi-choice
Reject Choice
Use case: Block specific choices with custom actions
Commonly used with: Choice, Multi-choice
Commonly used with: Choice, Multi-choice
Regex Validation
Regex (Regular Expression) validation lets you define custom patterns that user input must match. This is the most flexible validation type for enforcing specific formats.Configuration
| Property | Description |
|---|---|
regex | The regular expression pattern to match against |
message | Error message shown when validation fails (supports translations) |
Common Regex Examples
Copy and paste these patterns directly into your entity validation settings.- Phone Numbers
- Postal Codes
- Identification
- Text Formats
- Financial
Danish Phone Number (8 digits)Error message: Error message: Error message:
Please enter a valid 8-digit phone numberDanish Phone with Country CodePlease enter a valid Danish phone number (e.g., +45 12 34 56 78)International Phone (E.164 format)Please enter a valid international phone number starting with +Range Validation
Ensure numeric values fall within acceptable bounds.Configuration
| Property | Description |
|---|---|
min | Minimum allowed value |
max | Maximum allowed value |
Examples
Age Restrictions
Age Restrictions
Adult Only (18+)
- Min:
18 - Max:
120
- Min:
18 - Max:
67
- Min:
65 - Max:
120
Financial Limits
Financial Limits
Loan Amount
- Min:
10000 - Max:
5000000
- Min:
100 - Max:
50000
- Min:
0 - Max:
100
Length Validation
Control the minimum and maximum number of characters in text inputs.Configuration
| Property | Description |
|---|---|
minLength | Minimum number of characters required |
maxLength | Maximum number of characters allowed |
Examples
| Use Case | Min Length | Max Length |
|---|---|---|
| Name field | 2 | 100 |
| Short description | 10 | 200 |
| Comment/feedback | 20 | 1000 |
| Reference code | 6 | 6 |
| Password | 8 | 128 |
No Duplicate Value
Prevent users from entering values that have already been submitted in the same flow session.Configuration
| Property | Description |
|---|---|
key | Unique identifier for the duplicate check group |
Use Cases
- Prevent duplicate email entries in multi-person forms
- Ensure unique reference numbers
- Avoid repeated selections in list-based inputs
CPR Validation
Validates that input matches the Danish CPR (Central Person Register) number format. This is a format-only validation that checks the structure of the CPR number.Configuration
No additional configuration required. Simply add theCPR validation type to your entity.
What It Validates
- 10-digit format (DDMMYY-XXXX)
- Valid date portion (day, month, year)
- Correct structure with or without hyphen
Use Cases
- Customer onboarding flows
- Insurance applications
- Banking KYC processes
- Any flow requiring Danish personal identification
CPR Modulus 11
A stricter CPR validation that includes the modulus 11 checksum verification. This ensures the CPR number is not only correctly formatted but also mathematically valid.Configuration
No additional configuration required. Simply add theCPRModulus11 validation type to your entity.
How It Works
The modulus 11 algorithm multiplies each digit by a weight factor and checks if the sum is divisible by 11. This catches typos and invalid numbers that might pass basic format validation.When to Use
| Scenario | Recommended Validation |
|---|---|
| Quick format check | CPR |
| High-security flows (banking, insurance) | CPR Modulus 11 |
| Government integrations | CPR Modulus 11 |
| Customer self-service | CPR |
Some valid CPR numbers issued after 2007 may not pass modulus 11 validation due to changes in the Danish CPR system. Consider your use case when choosing between CPR and CPR Modulus 11.
Choices Validation
Ensures that a valid selection has been made in choice-based entities. This validation is typically applied automatically to required choice fields.Configuration
No additional configuration required. The validation ensures at least one valid option is selected.Use Cases
- Required single-choice questions
- Multi-choice with minimum selection requirements
- Dropdown menus that must have a selection
Reject Choice
Block specific choices from being accepted, optionally with custom error messages, warnings, or automated actions like redirects or tooltips.Configuration
| Property | Description |
|---|---|
choiceKey | The key of the choice to reject |
choiceCount | (Optional) Comparison operator and value for multi-choice scenarios |
message.error | (Optional) Error message to display (supports translations) |
message.warning | (Optional) Warning message to display (supports translations) |
action | (Optional) Automated action to trigger |
Available Actions
Reroute
Reroute
Redirect the user to a different URL when they select the rejected choice.
| Property | Description |
|---|---|
url | Redirect URL (external: https://site.com or internal: /page). Use {{LOCALE}} placeholder for locale-aware URLs. |
Video Modal Message
Video Modal Message
Display a modal with a video and title when the rejected choice is selected.
| Property | Description |
|---|---|
titleText | Modal title (supports translations) |
url | Video URL to display |
Tooltips
Tooltips
Show contextual tooltips to guide the user after selecting the rejected choice.
| Property | Description |
|---|---|
containerID | ID of the container element |
timeoutInMs | How long tooltips remain visible |
tooltips | Array of tooltip configurations with referenceID and label |
Examples
Block Ineligible UsersCombining Validations
You can apply multiple validation rules to a single entity. Validations are checked in order, and the first failing rule displays its error message. Example: Secure Reference Code- Length Validation: Min 8, Max 12
- Regex:
^[A-Z0-9]+$- Uppercase letters and numbers only - No Duplicate Value: Key
reference_codes
Best Practices
Clear Error Messages
Write specific, helpful messages that tell users exactly what’s expected. Avoid generic errors like “Invalid input.”
Test Your Patterns
Always test regex patterns with valid and invalid examples before publishing. Use online tools like regex101.com.
Consider Mobile Users
Some patterns work better with specific keyboard types. Consider using
inputmode attributes for phone numbers and numeric codes.Localize Messages
Error messages support translations. Provide translated versions for all languages your flow supports.
Regex Quick Reference
| Pattern | Meaning |
|---|---|
^ | Start of string |
$ | End of string |
\d | Any digit (0-9) |
\D | Any non-digit |
\w | Word character (a-z, A-Z, 0-9, _) |
\s | Whitespace (space, tab, newline) |
. | Any character except newline |
+ | One or more of the previous |
* | Zero or more of the previous |
? | Zero or one of the previous (optional) |
{n} | Exactly n occurrences |
{n,m} | Between n and m occurrences |
[abc] | Any character in the brackets |
[^abc] | Any character NOT in the brackets |

