
You can now use RegEx or Regular Expression syntax to validate the text form fields in your registration form.
This cheat sheet provides a handy reference for some of the most commonly used Regular Expressions (RegEx) in registration forms. Use these patterns to validate user inputs like phone numbers, postcodes, and more.
- Phone Number Validation (UK format)- Pattern: ^\+44\s?7\d{3}\s?\d{6}$
- Mobile Phone Number (UK Format) – Pattern:^(\+44\s?7\d{3}\s?\d{6}|\(?07\d{3}\)?\s?\d{6})$
- Postcode Validation (UK format) – Pattern: ^([A-Z]{1,2}\d[A-Z\d]? \d[A-Z]{2})$
- Username Validation (Alphanumeric, 3-15 characters) – Pattern: ^[a-zA-Z0-9]{3,15}$
- Password Validation (Min 8 characters, at least one letter and one number) – Pattern: ^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$
Employee ID Validation (Alphanumeric, 6-12 characters) – Pattern: ^[A-Za-z0-9]{6,12}$
If you need something more bespoke please contact a member of our Live Chat support team who are happy to assist.