View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
08217Bug reportsSurvey takingpublic2014-02-06 12:33
Reportermadflow Assigned ToDenisChenu  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.00+ 
Fixed in Version2.05+ 
Summary08217: "Numerical Input" question validation only client side
DescriptionWhen you create a numerical input question, you can define that the input should be an integer.

What we expected is, that there is a input validation on this question type.

But - the software seems only to perform an input filtering. When the user activates Javascript an input like 100.000 (german "Tausendertrenner") the script autocorrects to 100000. (This itself is arguably problematic - since a survey engine should not autocorrect, but this is probably an opinion).

When the user deactivates Javascript - there is no validation.

Since the database field is a decimal(30,10) input like:

100

and

100.000

are the same:

1000.0000000000

This broke our neck in a previous survey and ended up in hours of data cleaning :(


I posted this as "bug" - if you consider this a feature request - then here it is:

+ All data validation should be client and server side equally. In this case for the Numerical Input.
+ The software should not autocorrect input - since this is reactive data.
Steps To Reproduce+ Create a "Numerical Input" question
+ Turn Javascript on - and off.
+ Put an non integer value with javascript turned off in the input field and submit the page.
TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)Latest master branch
I will donate to the project if issue is resolvedNo
BrowserFirefox
Database & DB-VersionMysql 5.5.31
Server OS (if known)Debian Linux
Webserver software & version (if known)Apache 2
PHP Version5.5

Relationships

related to 08247 closeddominikvitt Javascript autocorrection of numerical values 
parent of 08665 closedDenisChenu Multiple numeric doesn´t work after Matrix Filter 
related to 07805 closedDenisChenu Comparaison String and Numeric is different in same page and other page 
related to 08265 closedDenisChenu Entering double dot in a numeric question empty value 

Users monitoring this issue

User List There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2013-10-04 19:06

developer   ~26523

Last edited: 2013-10-04 19:06

View 2 revisions

Hi,

Just for:
<quote>the script autocorrects to 100000. (This itself is arguably problematic - since a survey engine should not autocorrect, but this is probably an opinion).</quote>

I think i'm agree on that point : please Put a new bug report for this one.

I think we can use HTML5 web form system : put some color (red) for the user but don't remove the text.


I take the PHP part :)

madflow

madflow

2013-10-08 15:46

reporter   ~26626

Hi,

I understand that I should create a new ticket for the javascript autocorrect - I will, no problem.

I do not understand you comment on HTML5 forms, colors and text in this context though.
DenisChenu

DenisChenu

2013-10-08 15:49

developer   ~26627

Use numerci question type like text question tye with some validation.

If you put some validation on text question type : user can write what he want, but the tip are showned in red :)
madflow

madflow

2013-10-08 17:11

reporter   ~26633

Okay - you provided a workaround. Thanks for the tip.
DenisChenu

DenisChenu

2013-10-09 17:49

developer   ~26676

Last edited: 2013-10-09 17:50

View 2 revisions

For . : maybe better is to choose , for german survey then.

Because 100.00 = 100 in english (not in french: in french 100,00 = 100).

DenisChenu

DenisChenu

2013-10-10 13:52

developer   ~26692

Fix committed to 2.05 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=13223
DenisChenu

DenisChenu

2013-10-10 13:55

developer   ~26693

Fix committed to 2.05 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=13224
DenisChenu

DenisChenu

2013-10-11 12:47

developer   ~26723

PHP filtering string too : numeric and integer .

Filtering, not validate .....

Need more work on it
DenisChenu

DenisChenu

2013-10-21 12:40

developer   ~26869

Fix committed to 2.05 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=13291
c_schmitz

c_schmitz

2013-10-23 14:39

administrator   ~26949

2.05RC3 released

Related Changesets

LimeSurvey: 2.05 f1712f42

2013-10-10 11:52:07

DenisChenu

Details Diff
Dev: Start fix issue 08217: "Numerical Input" question validation only client side
Dev: PHP clean up numerci question type before doing test.
Dev: starting, because one (or more) filter to find
Dev: integer is fixed, but not numeric
Affected Issues
08217
mod - application/helpers/SurveyRuntimeHelper.php Diff File
mod - application/helpers/common_helper.php Diff File
mod - application/helpers/expressions/em_manager_helper.php Diff File
mod - application/helpers/qanda_helper.php Diff File
mod - scripts/survey_runtime.js Diff File

LimeSurvey: 2.05 5743eb0b

2013-10-10 11:54:18

DenisChenu

Details Diff
Revert "Dev: Start fix issue 08217: "Numerical Input" question validation only client side"

Dev: This reverts commit f1712f425d68723dc20ba067bd46d7e7568a24f5.
Dev: To be on own repo before testing
Affected Issues
08217
mod - application/helpers/SurveyRuntimeHelper.php Diff File
mod - application/helpers/common_helper.php Diff File
mod - application/helpers/expressions/em_manager_helper.php Diff File
mod - application/helpers/qanda_helper.php Diff File
mod - scripts/survey_runtime.js Diff File

LimeSurvey: 2.05 8b35c443

2013-10-10 12:00:03

DenisChenu

Details Diff
Dev: Start fix issue 08217: "Numerical Input" question validation only client side
Dev: PHP clean up numerci question type before doing test.
Dev: starting, because one (or more) filter to find
Dev: integer is fixed, but not numeric
Affected Issues
08217
mod - application/helpers/SurveyRuntimeHelper.php Diff File
mod - application/helpers/common_helper.php Diff File
mod - application/helpers/qanda_helper.php Diff File
mod - scripts/survey_runtime.js Diff File

LimeSurvey: 2.05 693d187c

2013-10-11 17:23:45

DenisChenu

Details Diff
Fixed issue 08217: "Numerical Input" question validation only client side
Dev: for numerical only actually
Dev: commented some javascript to really view the validation
Affected Issues
08217
mod - application/helpers/expressions/em_manager_helper.php Diff File
mod - scripts/expressions/em_javascript.js Diff File
mod - scripts/survey_runtime.js Diff File

Issue History

Date Modified Username Field Change
2013-10-02 10:23 madflow New Issue
2013-10-02 19:38 DenisChenu Assigned To => DenisChenu
2013-10-02 19:38 DenisChenu Status new => assigned
2013-10-04 19:06 DenisChenu Note Added: 26523
2013-10-04 19:06 DenisChenu Note Edited: 26523 View Revisions
2013-10-08 15:46 madflow Note Added: 26626
2013-10-08 15:49 DenisChenu Note Added: 26627
2013-10-08 15:49 DenisChenu Priority none => normal
2013-10-08 17:11 madflow Note Added: 26633
2013-10-09 10:48 c_schmitz Relationship added related to 08247
2013-10-09 17:49 DenisChenu Note Added: 26676
2013-10-09 17:50 DenisChenu Note Edited: 26676 View Revisions
2013-10-10 13:52 DenisChenu Changeset attached => LimeSurvey 2.05 f1712f42
2013-10-10 13:52 DenisChenu Note Added: 26692
2013-10-10 13:52 DenisChenu Resolution open => fixed
2013-10-10 13:55 DenisChenu Changeset attached => LimeSurvey 2.05 5743eb0b
2013-10-10 13:55 DenisChenu Note Added: 26693
2013-10-11 12:47 DenisChenu Note Added: 26723
2013-10-11 13:06 DenisChenu Relationship added related to 07805
2013-10-11 18:35 DenisChenu Relationship added related to 08265
2013-10-21 12:40 DenisChenu Changeset attached => LimeSurvey 2.05 8b35c443
2013-10-21 12:40 DenisChenu Changeset attached => LimeSurvey 2.05 693d187c
2013-10-21 12:40 DenisChenu Note Added: 26869
2013-10-21 12:41 DenisChenu Status assigned => resolved
2013-10-21 12:41 DenisChenu Fixed in Version => 2.05+
2013-10-23 14:39 c_schmitz Note Added: 26949
2013-10-23 14:39 c_schmitz Status resolved => closed
2014-02-06 12:33 DenisChenu Relationship added parent of 08665