View Issue Details

IDProjectCategoryView StatusLast Update
13727Feature requestsPluginspublic2018-07-01 11:13
ReporterDenisChenu Assigned To 
PrioritynoneSeverityfeature 
Status newResolutionopen 
Summary13727: Question template : adding automatically Expression Validation
DescriptionQuestion template allow HTML update, it‘s cool, but i think Question template must allow some Expression Validation

One example :
- email_template for short text : show input type='email' : easy, but need a regexp for email validation (from javascript AND server)
- postal_code_template (for france) : input type='text' , ,only regexp
Additional InformationIdea :
- Allow to add expression https://manual.limesurvey.org/Question_type_-_Multiple_numerical_input#Sub-question_validation_equation_.28em_validation_sq.29 : a twig file return an equation. for email : twig file can contain something like «regexMatch("/^(\w[-._+\w]*\w@\w[-._\w]*\w\.\w{2,3})?$/",self.NAOK)»
- Allow to add expression in https://manual.limesurvey.org/Question_type_-_Multiple_numerical_input#Sub-question_validation_equation_.28em_validation_sq.29
- Allow to add text (with some EM) in the 2 tips

Inside the twig file : we can use question attribute, maybe subquestion too (for some for each)

Another situation can be move arrayTextAdapt to question_template : https://www.limesurvey.org/index.php?option=com_sobipro&pid=76&sid=98:arraytextadapt&Itemid=729 . But here , i don't find the way to move it to question template : we can not call other models : right.
TagsNo tags attached.

Activities

DenisChenu

DenisChenu

2018-05-30 09:23

developer   ~47904

I put it in plugin, but it's not plugin :)
tpartner

tpartner

2018-05-30 11:55

developer   ~47915

+1 for the validation.
DenisChenu

DenisChenu

2018-05-30 17:25

developer   ~47926

The 2 : because for example for min : we need this, and this is only in em_validation_sq. self and this are in em_validation_q :).

If you have a "real situation" example, it can be great
DenisChenu

DenisChenu

2018-07-01 11:13

developer   ~48424

Related pull request : https://github.com/LimeSurvey/LimeSurvey/pull/1081

Issue History

Date Modified Username Field Change
2018-05-30 09:23 DenisChenu New Issue
2018-05-30 09:23 DenisChenu Note Added: 47904
2018-05-30 09:26 DenisChenu Additional Information Updated View Revisions
2018-05-30 11:55 tpartner Note Added: 47915
2018-05-30 17:25 DenisChenu Note Added: 47926
2018-07-01 11:13 DenisChenu Note Added: 48424