Welcome to the LimeSurvey Community Forum

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

Search Results (Searched for: validation)

  • nebulameek
  • nebulameek's Avatar
Today 14:09
Using simulated data for testing was created by nebulameek
Because the logic of the questionnaire can be very complex at times, manual testing might result in certain logical aspects not being thoroughly tested. Therefore, I have an idea to use a program to create a batch of simulated data to automatically test the questionnaire. For instance, I could choose to run 200 or 1000 sets of simulated data for testing, and record any information that fails validation, in order to identify any logical issues. At present, I'm not sure how to implement this feature, so I'm seeking advice on possible solutions or existing plugins that could be utilized.
  • DenisChenu
  • DenisChenu's Avatar
22 Apr 2024 10:46
En utilisant regexpMatch : manual.limesurvey.org/ExpressionScript_-...mplemented_functions
dans la validation : manual.limesurvey.org/Question_type_-_Sh...on_(em_validation_q)

Pour les mails : regexpMatch("/^.+?@.+?\..+$/", self.NAOK)

 
  • AntPIC
  • AntPIC's Avatar
20 Apr 2024 16:09
Replied by AntPIC on topic validation of multiple numeric inputs
Thanks Joffm

/^(195[0-9]|19[6-9][0-9]|20[0-9]{2}|2100)$/
  • Joffm
  • Joffm's Avatar
20 Apr 2024 15:25
Replied by Joffm on topic validation of multiple numeric inputs
You see what I entered to limit from 1950 to 2024.
And you may use
[url] regex101.com/ [/url]
to get more familiar with regular expressiona.
 
  • AntPIC
  • AntPIC's Avatar
20 Apr 2024 11:31
Replied by AntPIC on topic validation of multiple numeric inputs
and if i want a range between 1900-2100? What i have to insert?
  • Joffm
  • Joffm's Avatar
20 Apr 2024 11:15
Replied by Joffm on topic validation of multiple numeric inputs
It is correct syntax, but it allows 
1492
8745
Not very realistic years
  • AntPIC
  • AntPIC's Avatar
20 Apr 2024 09:50
Replied by AntPIC on topic validation of multiple numeric inputs
I just put this
/^([1-9][0-9][0-9][0-9])?$/
is correct?
  • AntPIC
  • AntPIC's Avatar
20 Apr 2024 09:20
Replied by AntPIC on topic validation of multiple numeric inputs
Thank you Joffm,
This work
count(self)<2 or (count(self)==2 AND D1a3_SQ001.NAOK<=D1a3_SQ002.NAOK)

Can I add a limit to the string of numbers which must be equal to 4?
  • Joffm
  • Joffm's Avatar
19 Apr 2024 16:43
Replied by Joffm on topic validation of multiple numeric inputs
Hi, 
To achieve that sett the validation to
count(self)<2 or (count(self)==2 and Q1_SQ001<=Q1_SQ002)
with a validation tip like
{if(count(self)==2 and Q1_SQ001>Q1_SQ002,"Conclusione greater or equal sottoscrizione","")}

Furthermore you may force the four digits and at the same time a certain range of years by a regular expression like
/^(([1][9][5-9][0-9])|([2][0][01][0-9])|([2][0][2][0-4]))?$/
Here from 1950 - 2024

 

File Attachment:

File Name: limesurvey...5116.lss
File Size:17 KB


Joffm
  • AntPIC
  • AntPIC's Avatar
18 Apr 2024 13:41
Versione 3.28.76Hi, I'm looking for an expression for validating a multiple entry numeric response (attached).
The response is validated if:
1. both boxes are empty;
2. if at least one of the two is full with a maximum length of 4 numeric digits
These two work
But I would need to enter a third option:
3. i.e. if both are filled in then the first value inserted must be lower than the second.
Here is the expression I am using (the bold part works but the second one doesn't)(is_empty(D1a3_SQ001.NAOK) OR strlen(D1a3_SQ001.NAOK) == 4) AND (is_empty(D1a3_SQ002.NAOK) OR strlen(D1a3_SQ002.NAOK) == 4) OR (!is_empty(D1a3_SQ001.NAOK) AND !is_empty(D1a3_SQ002.NAOK) AND D1a3_SQ002>=D1a3_SQ001)how can I solve it
  • MarkPkilop
  • MarkPkilop's Avatar
12 Apr 2024 12:57
Intergrating MailTester Ninja API was created by MarkPkilop
I would like all email addresses to be validated with an email address verifier such as [url] mailtester.ninja [/url]

This way I am sure about the seriousness of the survey as it has been checked as a correct email address

I know they are having an API maybe could it be used for such a validation
  • brais24
  • brais24's Avatar
03 Apr 2024 12:57
Replied by brais24 on topic mark red just specific cells Array text
Seems like it works, i have to modify a little bit with the ANDS and ORS but it works, i let the code over here.

Ecuation validation question:
(is_empty(M1_Y001_X003.NAOK)OR!is_empty(M1_Y001_X001.NAOK))AND(is_empty(M1_Y001_X004.NAOK)OR!is_empty(M1_Y001_X001.NAOK))AND(is_empty(M1_Y001_X005.NAOK)OR!is_empty(M1_Y001_X001.NAOK))AND(is_empty(M1_Y001_X006.NAOK)OR!is_empty(M1_Y001_X001.NAOK))AND(is_empty(M1_Y001_X007.NAOK)OR!is_empty(M1_Y001_X001.NAOK))AND(is_empty(M1_Y001_X001.NAOK)OR(!is_empty(M1_Y001_X008.NAOK)OR!is_empty(M1_Y001_X009.NAOK)OR!is_empty(M1_Y001_X010.NAOK)))

Help about validation question:
{if(((is_empty(M1_Y001_X003.NAOK)OR!is_empty(M1_Y001_X001.NAOK))AND(is_empty(M1_Y001_X004.NAOK)OR!is_empty(M1_Y001_X001.NAOK))AND(is_empty(M1_Y001_X005.NAOK)OR!is_empty(M1_Y001_X001.NAOK))AND(is_empty(M1_Y001_X006.NAOK)OR!is_empty(M1_Y001_X001.NAOK))), '', 'Por favor, introduzca algo en gasto total M1.<br />')}


{if(((is_empty(M1_Y001_X001.NAOK)OR(!is_empty(M1_Y001_X008.NAOK)OR!is_empty(M1_Y001_X009.NAOK)OR!is_empty(M1_Y001_X010.NAOK)))), '', 'Por favor, introduzca Entradas/salidas/stock.<br />')}

I have 2 sentences on the ecuation validation question because i want a different message if you put a value in one cell or in another.

If i have more issues or other this to add i let you know.

Thanks for the help.
  • DenisChenu
  • DenisChenu's Avatar
01 Apr 2024 11:23
Replied by DenisChenu on topic Comment obtenir un code iframe d'une enquête ?
C'est plus ou moins compliqué, mais c'est faisable

Le lien : c'est le lien de l'enquête, ensuite
<iframe src=" limesurvey.example.org/12345 ">

Mais
manual.limesurvey.org/Global_settings#Security
manual.limesurvey.org/Optional_settings/....28New_in_3.24.3_.29

Si tu ne peux pas les placer sur le même domaine principale (intégrer survey.example.org sans www.example.org ) : c'est relativement dangereux (XSS plus facile)!
  • tpartner
  • tpartner's Avatar
27 Mar 2024 18:37
Replied by tpartner on topic mark red just specific cells Array text
It seems to me that according to your mock-up above, the question validation equation should be:

Code:
(
    is_empty(M1_Y001_X003.NAOK) 
    OR 
    !is_empty(M1_Y001_X001.NAOK)
)
AND
(
    is_empty(M1_Y001_X004.NAOK) 
    OR 
    !is_empty(M1_Y001_X001.NAOK)
)
AND
(
    is_empty(M1_Y001_X005.NAOK) 
    OR 
    !is_empty(M1_Y001_X001.NAOK)
)
AND
(
    is_empty(M1_Y001_X006.NAOK) 
    OR 
    !is_empty(M1_Y001_X001.NAOK)
)
AND
(
    is_empty(M1_Y001_X007.NAOK) 
    OR 
    !is_empty(M1_Y001_X001.NAOK)
)
AND
(
    is_empty(M1_Y004_X001.NAOK) 
    OR 
    (
        !is_empty(M1_Y004_X008.NAOK)
        AND
        !is_empty(M1_Y004_X009.NAOK)
        AND
        !is_empty(M1_Y004_X010.NAOK)
    )
)
  • brais24
  • brais24's Avatar
27 Mar 2024 16:21
Replied by brais24 on topic mark red just specific cells Array text
Hi there, i have a little update, i be able to do what i want with 2 of the cells, when i insert a value on the second cell of the first row, an alert popup saying that you have to insert something on the first cell of the first row, like you can see here.
 

And when you insert something on the first cell of the first row, the message dissapear as you can see.
 

I be able to do it using this code on ecuation validation question:
((is_empty(M1_Y001_X003.NAOK)) or (!is_empty(M1_Y001_X003.NAOK) and (!is_empty(M1_Y001_X001.NAOK))))

And this on help about validation question:
{if((((is_empty(M1_Y001_X003.NAOK)) or (!is_empty(M1_Y001_X003.NAOK) and (!is_empty(M1_Y001_X001.NAOK))))), '', 'Por favor, introduzca algo en gasto total M1.<br />')}

Now i have to do the same with the other 4 cells on the same row, and then do the same but in other way, if you insert a value on the first cell, should appear a message saying that you have to insert a value on the last 3 cells.

¿Can someone help me to do this?

I try to add the 3rd cell (Wich is the 4th by code) with this on validation question and help about validation question, but dont work, I think it's because of the nested validations.

(((is_empty(M1_Y001_X003.NAOK)) or (is_empty(M1_Y001_X004.NAOK))) or ((!is_empty(M1_Y001_X003.NAOK) or !is_empty(M1_Y001_X004.NAOK)) and (!is_empty(M1_Y001_X001.NAOK))))

{if(((((is_empty(M1_Y001_X003.NAOK)) or (is_empty(M1_Y001_X004.NAOK))) or 
((!is_empty(M1_Y001_X003.NAOK) or !is_empty(M1_Y001_X004.NAOK)) and (!is_empty(M1_Y001_X001.NAOK))))), '', 'Por favor, introduzca algo en descripción de los programas.<br />')}

I attach the lss again with the code too.
 

File Attachment:

File Name: limesurvey...3-27.lss
File Size:40 KB


In advance, thanks for the help.
Displaying 1 - 15 out of 181 results.

Lime-years ahead

Online-surveys for every purse and purpose