View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
11620Bug reportsExpression Managerpublic2017-01-06 12:15
Reporterroutard Assigned Tomarkusfluer 
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version2.51.x 
Fixed in Version2.56.x 
Summary11620: Validation equation bug
Description

Hi,
I have a bug with the validation equation. I think this bug was solved 2 years ago with an old version (I reported it) but not sure at all...
The question type is short text.
I want the user to enter a 4 digit code between 1000 and 6999 OR equal to 0000 (four zeros, not only one !).
My validation equation is #^[1-6][0-9]{3}|0000$#
It's OK in all the cases but there is a problem with the question valid message {QUESTION_VALID_MESSAGE}. With my theme, if the answer is correct the {QUESTION_VALID_MESSAGE} is green. And it's red if the answer is not correct.
There is a bug with 0000. The {QUESTION_VALID_MESSAGE} remains red. I think the answer '0000' is considered as a number so '0000' becomes '0' and the question valid message remains red. Once more, even in this case the validation equation is OK and I can go to the next question (all questions are mandatory).

TagsNo tags attached.
Attached Files
Bug heat8
Complete LimeSurvey version number (& build)2.51.0+160829
I will donate to the project if issue is resolvedNo
Browser
Database type & version5.7.11 - MySQL
Server OS (if known)Linux
Webserver software & version (if known)Wampserver 3.0.4
PHP Version7.0.4

Relationships

related to 10860 closedDenisChenu Regular expression fail (2.06+) 
child of 09242 closedmarkusfluer PHP and JS difference with numeric value starting by 0 

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2016-09-03 12:29

developer   ~40672

Can you upload the lss file with this validation please.

routard

routard

2016-09-03 14:24

reporter   ~40674

Salut, c'est fait. Il s'agit de la première question "Quel est le code personnel de l'élève ?" ?

Je veux bien que tu supprimes les pièces jointes quand tu les auras récupérées car elles contiennent les jetons :-)

Merci !

DenisChenu

DenisChenu

2016-09-03 18:44

developer   ~40675

Confirm the issue, and right : i think i already fixed that bug :)
https://github.com/LimeSurvey/LimeSurvey/commit/16a9571276661c86c39b9c22a3206743b821f2db

DenisChenu

DenisChenu

2016-09-03 18:46

developer   ~40676

@markusfluer : See comment of the fix you removed:
// return numeric only if it don't update string : see bugs 10860 + 08324 + 07805.

markusfluer

markusfluer

2016-12-05 17:22

administrator   ~42376

fixed with 11894

c_schmitz

c_schmitz

2017-01-06 12:15

administrator   ~42658

New version released.

Issue History

Date Modified Username Field Change
2016-09-02 22:31 routard New Issue
2016-09-03 12:29 DenisChenu Note Added: 40672
2016-09-03 14:22 routard File Added: limesurvey_question_4259.lsq
2016-09-03 14:23 routard File Added: limesurvey_survey_569883.lss
2016-09-03 14:24 routard Note Added: 40674
2016-09-03 18:42 DenisChenu File Deleted: limesurvey_question_4259.lsq
2016-09-03 18:42 DenisChenu File Deleted: limesurvey_survey_569883.lss
2016-09-03 18:42 DenisChenu File Added: limesurvey_survey_EquationBugOneQuestion.lss
2016-09-03 18:44 DenisChenu Note Added: 40675
2016-09-03 18:45 DenisChenu Relationship added child of 09242
2016-09-03 18:45 DenisChenu Relationship added related to 10860
2016-09-03 18:45 DenisChenu Assigned To => markusfluer
2016-09-03 18:45 DenisChenu Status new => assigned
2016-09-03 18:46 DenisChenu Note Added: 40676
2016-12-05 17:22 markusfluer Note Added: 42376
2016-12-05 17:22 markusfluer Status assigned => resolved
2016-12-05 17:22 markusfluer Resolution open => fixed
2016-12-05 17:22 markusfluer Fixed in Version => 2.56.x
2017-01-06 12:15 c_schmitz Note Added: 42658
2017-01-06 12:15 c_schmitz Status resolved => closed