Email Validation

More
5 months 5 days 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 to join the conversation.

More
5 months 5 days ago - 5 months 5 days 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
Last Edit: 5 months 5 days ago by Joffm.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!