When you ask a user a question in a bot flow, they might type anything. Regex (regular expression) validation lets you specify the exact format a reply must match — a 10-digit phone number, a 6-digit OTP, a 2-digit age, or an email address — and reject any reply that does not match before continuing the flow.
Copy any of these into the validation field:
10-digit Indian mobile number: /^[6-9]\d{9}$/
6-digit OTP: /^\d{6}$/
2-digit number: /^\d{2}$/
Email address: /^[\w.-]+@[\w.-]+\.[a-z]{2,}$/
Date (DD/MM/YYYY): /^\d{2}\/\d{2}\/\d{4}$/
Pincode (India, 6 digits): /^[1-9][0-9]{5}$/Not sure how to write a pattern? Use the Regex Creator GPT — describe what you need in plain English and it generates the pattern for you.
Was this helpful? If you are stuck, message us and a real person will help — the only platform that answers you live on WhatsApp.
Ask us on WhatsAppFull reference for question types, answer saving, and validation options.
Read guide →Use button payloads to avoid free-text input where possible.
Read guide →The complete guide to building a bot flow from trigger to completion.
Read guide →