Welcome, Guest
Username: Password: Remember me

TOPIC: E-mail validation

E-mail validation 1 year 8 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.

Re: E-mail validation 1 year 8 months ago #90358

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4139
  • Thank you received: 767
  • Karma: 349
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: E-mail validation 1 year 8 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.

Re: E-mail validation 1 year 8 months ago #90421

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6277
  • Thank you received: 801
  • Karma: 241
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
Last Edit: 1 year 8 months ago by DenisChenu. Reason: SQG
The administrator has disabled public write access.

Re: E-mail validation 1 year 7 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.
Moderators: ITEd
Time to create page: 0.216 seconds
Donation Image