Question validation equation error

Plus d'informations
il y a 9 mois 1 semaine - il y a 9 mois 1 semaine #169584 par waitz
COM_KUNENA_MESSAGE_CREATED_NEW
I have a custom validation of a subquestion in a Mulitiple Short Text question. In the Question validation equation field I have entered:
(is_empty(PHONE_TEL01.NAOK) OR regexMatch('/^\+(?: ?\d)+$/',PHONE_TEL01.NAOK))

This gives a warning and a red box around the question even before the user has started to enter anything in the field.
How can I wait to give a warning of the field being filled incorrectly until the user presses Next to continue the survey?

Version 2.73.1+171220
Last edit: il y a 9 mois 1 semaine by waitz.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 9 mois 1 semaine #169636 par tpartner
COM_KUNENA_MESSAGE_REPLIED_NEW
What is the regex supposed to restrict to? Can you attach a sample survey containing only that question?

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 9 mois 1 semaine #169646 par waitz
COM_KUNENA_MESSAGE_REPLIED_NEW
The question has 5 subquestions, and the user has to fill in at least one of the subquestions, and this subquestion has to fullfill the requirement of being an international phone number.

Fichier attaché :

Nom du fichier : limesurvey....lsq.txt
Taille du ficher :8 ko

Version 2.73.1+171220
Pièces jointes :

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 9 mois 1 semaine #169711 par tpartner
COM_KUNENA_MESSAGE_REPLIED_NEW
Your sample question seems to work as expected for me. Initially, there is no red border but the warning text is red as it should be because the question is unanswered.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Connexion ou Créer un compte pour participer à la conversation.

Commencez dès maintenant !

Créez simplement un compte et commencez à utiliser LimeSurvey dès aujourd'hui.

Inscrivez-vous maintenant

Inscrivez-vous à notre Newsletter!