Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: E-mail validation

E-mail validation 3 years 9 months ago #90331

  • mimi
  • mimi's Avatar
  • Offline
  • Junior Lime
  • Posts: 32
  • Karma: 0
hi...

based on the pic i'd given, i want to make the word '(This email address is being protected from spambots. You need JavaScript enabled to view it.)' will appear when the user key in the wrong format of email.

at 1st the sentence does not appear, but when the user key in the wrong format of email, the word of '(This email address is being protected from spambots. You need JavaScript enabled to view it.)' will appear

can someone help me with this thing...

tQ so much.
Attachments:
The administrator has disabled public write access.

E-mail validation 3 years 9 months ago #90358

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6308
  • Thank you received: 1407
  • Karma: 546
Do you have a regular expression in mind to validate the format?
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.

E-mail validation 3 years 9 months ago #90417

  • mimi
  • mimi's Avatar
  • Offline
  • Junior Lime
  • Posts: 32
  • Karma: 0
nope... at 1st i juz trying with limesurvey validation, which is already in 'show advance setting'. and the regular expression i also using what u had give in limesurvey website. but its not working too. myb i missed some part.

ok what if i want to use php code to validate it. can i? where i must put the code.
The administrator has disabled public write access.

E-mail validation 3 years 9 months ago #90421

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9346
  • Thank you received: 1338
  • Karma: 386
Hello,

With question code to: MAIL, the first sub code to MAIL
In the "Sub-question validation equation" :
regexMatch("/^(\w[-._+\w]*\w@\w[-._\w]*\w\.\w{2,3})?$/",MAIL_MAIL)

In the Sub-question validation tip
(abcdef@example.com)

And after just need to move the text near the first input in js.
$(function() {
 $("#question{QID} .em_sq_fn_validation").insertAfter($("#question{QID} answer{SGQ}MAIL");
});

Maybe some css to have the text not displaying if good (class= good).

Denis
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
Last Edit: 3 years 9 months ago by DenisChenu. Reason: SQG
The administrator has disabled public write access.

E-mail validation 3 years 8 months ago #90984

  • mimi
  • mimi's Avatar
  • Offline
  • Junior Lime
  • Posts: 32
  • Karma: 0
ok. Thank You s0 much.
The administrator has disabled public write access.
Time to create page: 0.207 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form