Welcome, Guest
Username: Password: Remember me

TOPIC: How to add regular express validation in short text input field?

How to add regular express validation in short text input field? 2 years 7 months ago #73464

  • sammy
  • sammy's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 25
  • Karma: 0
Is add into 'Validation' ? if so, the regular express will display as attach screen? How to hidden it ? Thanks
Attachments:
The administrator has disabled public write access.

Re: How to add regular express validation in short text input field? 2 years 7 months ago #73468

  • Steve
  • Steve's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 494
  • Thank you received: 46
  • Karma: 17
Hello,

which LimeSurvey version do you use? LimeSurvey 1.92RC1 or 1.92RC2? We had a discussion at www.limesurvey.org/de/forum/development/...-in-validation-field and it came to the point whhere we discussed if this messages should be hidden. If I'm correct TMSWhite fixed/updated it in LimeSurvey 1.92RC3 (or a few build after this release candidate) so it might be a good idea to update your/install a new LimeSurvey installation.
Mit freundlichen Grüßen/Best regards,

Stefan Gohlke
LimeSurvey Team
The administrator has disabled public write access.

Re: How to add regular express validation in short text input field? 2 years 7 months ago #73475

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
In 1.92 RC4, we have eliminated the display of the regular expression validation message, since we figure very few people would understand it. Instead, if people want to guide users, they can put a readable tip in the Help message, or in the new em_validation_sq or em_validation_q advanced question options.
The administrator has disabled public write access.

Re: How to add regular express validation in short text input field? 2 years 7 months ago #73484

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
TMSWhite wrote:
in the new em_validation_sq or em_validation_q advanced question options.
Do we have some documentation for this already?

Talking about documentation: How about the Google Analytics docs :)

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: How to add regular express validation in short text input field? 2 years 7 months ago #73495

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
Basic documentation for em_validation_* is here: docs.limesurvey.org/Advanced+question+se...#em_validation_q_tip

It is also linked to each question supporting it, such as here: docs.limesurvey.org/Question+type+-+Shor...sion_1.92_and_beyond

The Google Analytics documentation is here: docs.limesurvey.org/Global+settings&highlight=analytics#General

It's possible that any/all of those should be expanded, but the core documentation has been available for about a week.
The administrator has disabled public write access.

Re: How to add regular express validation in short text input field? 2 years 7 months ago #73515

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
Great work!

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: How to add regular express validation in short text input field? 2 years 7 months ago #73541

  • sammy
  • sammy's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 25
  • Karma: 0
Thanks your information, I test in 1.92RC3.
Where to input the validation of question input ? Or my setting in incorrect field option of question ?
The administrator has disabled public write access.

Re: How to add regular express validation in short text input field? 2 years 7 months ago #73542

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
To add regular expression validation of short text or multiple short text, simply enter the regular expression in the "validation" field (one of the core fields, not one of the advanced question settings). This regular expression will be used to validate the short text input (or each of the multiple short text inputs, if that is the question type you use).
The administrator has disabled public write access.

Re: How to add regular express validation in short text input field? 2 years 7 months ago #73564

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
So the same regex will be applied to all sub-questions? Wouldn't that cause problems if you want to validate an adress field, an email field and a phone number in one question?

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: How to add regular express validation in short text input field? 2 years 7 months ago #73577

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
the preg field is question specific, so in the future, we could allow for sub-question-level validation - e.g. a different regex for each sub-question. Right now, that isn't supported. However, it would really only require a new GUI to enter sub-question-level validation (and relevance, since that is also often desired), plus minor changes to EM.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.129 seconds
Donation Image