Email Validation

More
1 year 2 months ago #158706 by manasa
manasa replied the topic: Email Validation
Hi Ben,

This post is useful. However, I am trying to validate the email address which is a subquestion in one of the multiple text question types, What code do I use under Sub-question validation equation? Also, I need to validate the phone number in the same question type.

Thanks,
Manasa

Please Log in or Create an account to join the conversation.

More
1 year 2 months ago - 1 year 2 months ago #158708 by Joffm
Joffm replied the topic: Email Validation
Hello, manasa,

you ask how to include the expressions?

Well, that's easy.

In
https://manual.limesurvey.org/Using_regular_expressions
you find some pre-defined expressions and in

https://manual.limesurvey.org/Expression_Manager#Implemented_Functions
you find the function "regexMatch".


Just enter in your subquestion validation something like:
regexMatch('[YOUR REGULAR EXPRESSION 1]',Q1_SQ002) && regexMatch('[YOUR REGULAR EXPRESSION 2]',Q1_SQ004)

Expression string with quotes and slashes.

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last Edit: 1 year 2 months ago by Joffm.

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!