Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Email Validation

More
6 years 7 months ago #158706 by manasa
Replied by manasa on 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
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 7 months ago - 6 years 7 months ago #158708 by Joffm
Replied by Joffm on topic Email Validation
Hello, manasa,

you ask how to include the expressions?

Well, that's easy.

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

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: 6 years 7 months ago by Joffm.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose