View Issue Details

This issue affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
05974Bug reportsData Entry (non public)public2012-04-12 00:43
ReporterDenisChenu Assigned ToTMSWhite  
PrioritylowSeverityminor 
Status closedResolutionno change required 
Product Version1.92+ 
Summary05974: Sub-question validation equation in short/long text question
Description

In short text question, we have Sub-question validation equation.

But i think we can't have Sub-question validation equation in short text question.
Maybe there are utility, the change the text can be a good option :).

Steps To Reproduce

Add a short text question, see the advanced parameter.

Additional Information

Patch is very easy ;)

$qattributes["em_validation_sq"]=array(
"types"=>";:KQ",
'category'=>$clang->gT('Logic'),
'sortorder'=>220,
'inputtype'=>'textarea',
"help"=>$clang->gT('Boolean equation to validate each sub-question.'),
"caption"=>$clang->gT('Sub-question validation equation'));

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)120402
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Versionnot relevant
Git branch / Pull Request URL

Users monitoring this issue

There are no users monitoring this issue.

Activities

TMSWhite

TMSWhite

2012-04-02 15:40

reporter   ~18167

This is really more of a naming issue.

em_validation_sq means that if there is an error in the text entry field, the background can be color coded pink (as will the em_validation_sq_tip, if non-empty)

em_validation_q means that if there is an error in the text entry field, the em_validation_q_tip will be color coded pink (if non-empty), but the background color for the text entry field will NOT be color coded pink.

That's why I left both options for Short, Long and Huge texts, plus numeric input - it gave users a little more flexibility in how the display was handled.

Perhaps we need better names for those attributes (or their descriptors)? Suggestions are welcome.

DenisChenu

DenisChenu

2012-04-02 15:48

developer   ~18168

If i understand right:
em_validation_q mean : validation on a question
em_validation_sq : validation on an input:text or textarea.

And for non-mandatory :what the way ?
em_validation_q => mandatory even if it's none mandatory for a simple regexp
em_validation_sq => not mandatory ? with a simple regexp (empty:no tested)

Or em_validation_q AND em_validation_sq set the answer to be mandatory (except if you make a test if empty in regexep)

TMSWhite

TMSWhite

2012-04-02 15:56

reporter   ~18169

Not quite.

Both em_validation_q and em_validation_sq are optional - either will accept an empty response unless either (a) the question is mandatory, or (b) the validation criteria itself forces a response (like strlen(this) > 0)

Also, em_validation_sq applies the same validation rules to every input:text or textarea (sub-question) within the question (even if there is only one such input field).

em_validation_q does not replicate the validation equation for every sub-question.

See this link for some examples: http://docs.limesurvey.org/Expression+Manager+Sample+Surveys#Validation_Equations

TMSWhite

TMSWhite

2012-04-04 20:23

reporter   ~18201

Not a bug - as described, this is a feature giving users two ways to visualize data entry errors for single fields.

DenisChenu

DenisChenu

2012-04-04 20:33

developer   ~18202

Proposition for "source file" language
em_validation_q : Question validation equation (not change)
em_validation_sq : Text validation equation OR Input validation equation

Issue History

Date Modified Username Field Change
2012-04-02 12:35 DenisChenu New Issue
2012-04-02 12:35 DenisChenu Status new => assigned
2012-04-02 12:35 DenisChenu Assigned To => TMSWhite
2012-04-02 15:40 TMSWhite Note Added: 18167
2012-04-02 15:48 DenisChenu Note Added: 18168
2012-04-02 15:56 TMSWhite Note Added: 18169
2012-04-04 20:23 TMSWhite Note Added: 18201
2012-04-04 20:23 TMSWhite Status assigned => resolved
2012-04-04 20:23 TMSWhite Resolution open => no change required
2012-04-04 20:33 DenisChenu Note Added: 18202
2012-04-12 00:43 c_schmitz Status resolved => closed