Validation

More
7 months 1 week ago #175270 by FriedrichSimon
Validation was created by FriedrichSimon
Ich habe ein Problem mit der Validierung eines Textfelds. In der vorschau in LimeSurvey klappt es wunderbar - nur leider in der App 'Offlinesurveys' nicht.

Hat jemand eine Idee?

Die Validierungsregel lautet: /^(([0][1-9])|([1][0-4]))-([\d]{4})$/

___________________________________________________________

I have a problem with validating a text box. In the preview in LimeSurvey it works wonderfully - but unfortunately not in the app 'Offlinesurveys'.

Does somebody has any idea?

The validation rule is: /^(([0][1-9])|([1][0-4]))-([\d]{4})$/

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
7 months 1 week ago #175283 by FriedrichSimon
Replied by FriedrichSimon on topic Validation
Ich habe das Problem eingrenzen können.
Offlinesurveys kann offenbar nicht mit einem Logischen Oder ("|") umgehen.
Eine Validierung wie /^(0|1)$/ funktioniert leider nicht. Ich habe den Support diesbezüglich kontaktiert.



I have been able to narrow down the problem.
Obviously, offlinesurveys can not handle a logical or ("|").
A validation like /^(0|1)$/ does not work. I contacted the support in this regard.

Please Log in or Create an account to join the conversation.

More
7 months 1 week ago - 7 months 1 week ago #175310 by aaskoura
Replied by aaskoura on topic Validation
Hi,
Yes validation breaks very often because it is dependent on the survey DOM, which changes frequently with new LS releases. If you can share your survey, I will have that fixed ASAP. Just the public url, no need for credentials

Regards,
Amr Askoura,
OfflineSurveys Support
Last edit: 7 months 1 week ago by aaskoura.

Please Log in or Create an account to join the conversation.

More
7 months 1 week ago #175321 by FriedrichSimon
Replied by FriedrichSimon on topic Validation
Hi,

I have created an Demo survey with 1 | 0 validation.

https://Demo.limesurvey.org/index.php?r=survey/index&sid=452719&lang=de

Thank you for fast response.

Please Log in or Create an account to join the conversation.

More
7 months 1 week ago #175363 by aaskoura
Replied by aaskoura on topic Validation
500 Internal Server Error on this link

Please Log in or Create an account to join the conversation.

More
7 months 1 week ago #175368 by jelo
Replied by jelo on topic Validation
The Demo installation is buggy. I get such errors often during the last weeks.
The Demo installation is reset from time to time. Please attach files in threads.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Please Log in or Create an account to join the conversation.

More
7 months 1 week ago - 7 months 1 week ago #175372 by FriedrichSimon
Replied by FriedrichSimon on topic Validation
Made it again: Validation on Demo-LimeSurvey

and .lss attached.
Attachments:
Last edit: 7 months 1 week ago by FriedrichSimon.

Please Log in or Create an account to join the conversation.

More
7 months 1 week ago #175380 by aaskoura
Replied by aaskoura on topic Validation
It looks very OK to me... Don't you experience the same?
Attachments:

Please Log in or Create an account to join the conversation.

More
7 months 1 week ago #175384 by FriedrichSimon
Replied by FriedrichSimon on topic Validation
Unfortunately no, on my 'offlinesurvey' the valid entries are not recognized as such.
Attachments:

Please Log in or Create an account to join the conversation.

More
7 months 1 week ago - 7 months 1 week ago #175389 by aaskoura
Replied by aaskoura on topic Validation
To be clear... This validation popup shows only when you submit... yes?
Can you tell me which version of the app are you using? and on what device? which Android version?
Last edit: 7 months 1 week ago by aaskoura.

Please Log in or Create an account to join the conversation.

More
7 months 1 week ago - 7 months 1 week ago #175391 by FriedrichSimon
Replied by FriedrichSimon on topic Validation
To be clear... This validation popup shows only when you submit... yes?
Yes, but the red marker showes befor that the validation is not correct.
Can you tell me which version of the app are you using?
Ver. 1.43
and on what device? which Android version?
Tested with: Samsung T580 and OnePlusOne Android.
Last edit: 7 months 1 week ago by FriedrichSimon.

Please Log in or Create an account to join the conversation.

More
7 months 1 week ago #175394 by aaskoura
Replied by aaskoura on topic Validation
I think there is a confusion here
1- on OfflineSurveys -> if you enter A, then the validation message will be Red... correct?
2- on OfflineSurveys -> if you enter A and press submit, then the popup will show... correct?
3- on OfflineSurveys -> if you leave the field empty and press submit, then the answer will be saved without issues... correct?

This is the expected behavior

Please Log in or Create an account to join the conversation.

More
7 months 1 week ago #175398 by FriedrichSimon
Replied by FriedrichSimon on topic Validation
1- on OfflineSurveys -> if you enter A, then the validation message will be Red... correct?

it is, BUT it should not! In the web-based survey it works correctly.
For A,B,0,1 it should not be red marked.

2- on OfflineSurveys -> if you enter A and press submit, then the popup will show... correct?

Yes, BUT it should not! Because A is an valid input.

3- on OfflineSurveys -> if you leave the field empty and press submit, then the answer will be saved without issues... correct?
In this case yes, because it is not an obligatory question, so NULL is also an valid answer.

I have created another survey with an working validation (without | OR statement) and one not working see attachment.
Attachments:

Please Log in or Create an account to join the conversation.

More
7 months 1 week ago #175402 by aaskoura
Replied by aaskoura on topic Validation
now I understand :), please give me a couple of days this fix this
The following user(s) said Thank You: FriedrichSimon

Please Log in or Create an account to join the conversation.

More
7 months 1 week ago #175415 by aaskoura
Replied by aaskoura on topic Validation
We have pushed a release... it will reach 100% rollout by Monday (you should get update notification by Monday max)

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!