- Posts: 5
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Whole question validation equation (em_validation_q)
- sekijr
- Topic Author
- Offline
- New Member
Less
More
7 years 1 month ago - 7 years 1 month ago #149929
by sekijr
Whole question validation equation (em_validation_q) was created by sekijr
I'm trying to follow
this manual
And here are my validation fields
Sub-question validation equation:
Sub-question validation tip:
But it doesn't let me go through. What am I doing wrong?
Sub-question validation equation:
Code:
(is_empty(address_postcode) or regexMatch ('/\b\y\d{2}-\d{3}\b/', address_postcode)) and (is_empty(address_post)or regexMatch ('/[a-zA-Z0-9]/', address_post))
Code:
{if((is_empty(address_postcode) or regexMatch ('/\b\d{2}-\d{3}\b/', address_postcode)),'', 'Postcode is XX-XXX. i.e. 11-995<br />')} {if((is_empty(address_post)or regexMatch ('/[a-zA-Z0-9]/', address_post)),'', 'Type a proper post name.')}
But it doesn't let me go through. What am I doing wrong?
Last edit: 7 years 1 month ago by sekijr.
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
7 years 1 month ago #149932
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Whole question validation equation (em_validation_q)
"Whole question validation equation" like in the subject or "Sub-question validation equation" like in your post?
I would test sections of the equation before putting all parts together.
It could be that you're doing everything correct but LimeSurvey has a bug.
So what version/build of LimeSurvey is used?
I would test sections of the equation before putting all parts together.
It could be that you're doing everything correct but LimeSurvey has a bug.
So what version/build of LimeSurvey is used?
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- sekijr
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
7 years 1 month ago #149934
by sekijr
Replied by sekijr on topic Whole question validation equation (em_validation_q)
The latest, jelo. Installed today.
The subject refers to the tutorial/manual's name in the link provided but I am using multiple short text with three sub-questions where two of them are validated by regex
Thank you for your response btw.
The subject refers to the tutorial/manual's name in the link provided but I am using multiple short text with three sub-questions where two of them are validated by regex
Thank you for your response btw.
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
7 years 1 month ago #149936
by jelo
You should export a survey with your question with issues. I don't know which place the validation equation is put. That's why I asked about the whole question vs. sub-question validation wording in your post.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Whole question validation equation (em_validation_q)
You will have to post the version/build. There are different branches and if everybody post today the search function will be useless if you search for certain versions.sekijr wrote: The latest, jelo. Installed today.
You should export a survey with your question with issues. I don't know which place the validation equation is put. That's why I asked about the whole question vs. sub-question validation wording in your post.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- sekijr
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
7 years 1 month ago #149937
by sekijr
Replied by sekijr on topic Whole question validation equation (em_validation_q)
I am not using any nightly builds or beta builds. I said I am using the latest one which is Version 2.64.0+170307
Survey file attached as requested
Survey file attached as requested
Attachments:
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11658
- Thank you received: 2742
7 years 1 month ago #149938
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Whole question validation equation (em_validation_q)
Well, and Jelo told you that there are more than one stable branch at the moment (2.6x and 2.6.x) and this is why he is asking.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The following user(s) said Thank You: sekijr
The topic has been locked.
- sekijr
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
7 years 1 month ago #149939
by sekijr
Replied by sekijr on topic Whole question validation equation (em_validation_q)
I apologize for my ignorance then
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
7 years 1 month ago #149943
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Whole question validation equation (em_validation_q)
Use the question validation field instead of the subquestion validation.
I'm currently out of time but please try to change the AND into a OR and check if that helps.
Put that into the question validation (advanced settings of question)
I'm currently out of time but please try to change the AND into a OR and check if that helps.
Put that into the question validation (advanced settings of question)
Code:
(is_empty(address_postcode) or regexMatch ('/\b\y\d{2}-\d{3}\b/', address_postcode)) or (is_empty(address_post)or regexMatch ('/[a-zA-Z0-9]/', address_post))
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- sekijr
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
7 years 1 month ago #149998
by sekijr
Replied by sekijr on topic Whole question validation equation (em_validation_q)
I did it as you asked. The tip shows up in green (default theme) and it lets me through even if I type letters in address_postcode field.
Seems that I am doing something wrong or the regex validation is bugged I used this feature in the old LimeSurvey 2.2x and it worked like a charm.
Seems that I am doing something wrong or the regex validation is bugged I used this feature in the old LimeSurvey 2.2x and it worked like a charm.
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
7 years 1 month ago #150006
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Whole question validation equation (em_validation_q)
I would check every regex in a separate equation and via the question options regex field.
E.g. manual.limesurvey.org/Question_type_-_Sh...28preg_validation.29
There are RegEx bugs in LimeSurvey popping up from time to time where certain rules are not working correctly. Sometimes everything is done correctly but LS is buggy.
E.g. manual.limesurvey.org/Question_type_-_Sh...28preg_validation.29
There are RegEx bugs in LimeSurvey popping up from time to time where certain rules are not working correctly. Sometimes everything is done correctly but LS is buggy.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13645
- Thank you received: 2491
7 years 1 month ago #150069
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Whole question validation equation (em_validation_q)
If LS seems buggy : the best is to make a bug report
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.