- Posts: 3
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
(is_empty(q1_email) or regexMatch('/(\w[-._\w]*\w@\w[-._\w]*\w\.\w{2,3})/', q1_email)) and (is_empty(q1_phone) or regexMatch('/^(?:\([2-9]\d{2}\)\ ?|[2-9]\d{2}(?:\-?|\ ?))[2-9]\d{2}[- ]?\d{4}$/', q1_phone))
{if((is_empty(q1_email) or regexMatch('/(\w[-._\w]*\w@\w[-._\w]*\w\.\w{2,3})/', q1_email)), '', 'Please enter a valid email address.<br />')} {if((is_empty(q1_phone) or regexMatch('/^(?:\([2-9]\d{2}\)\ ?|[2-9]\d{2}(?:\-?|\ ?))[2-9]\d{2}[- ]?\d{4}$/', q1_phone)), '', 'Please enter a valid phone number.')}
{if(validation_expression,'','Please enter a valid ....')}
Please add a note to the manual as well so other benefit from the findings, too.janwillem64 wrote: Hello TMSWhite, Got it!! For the others with same issue. Go to question. Go to advanced settings. Fill in the validation in 'Question validation equation' and the tip in 'Question validation tip'. The tip validates the same and shows the error message. q1 is your question code and email is sub question code. Good luck. And thanks TMSWhite.
{if(validation_expression,'',if(LANG=='en','Please enter a valid ....','Bitte antworten ...'))}
<span lang="en">'Please enter </span><span lang="de">Bitte antworten</span>
:lang(en) :lang(de){display:none} :lang(de) :lang(en){display:none}