E-mail validation

More
4 years 11 months ago #90331 by mimi
mimi created the topic: E-mail validation
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:

Please Log in to join the conversation.

More
4 years 11 months ago #90358 by tpartner
tpartner replied the topic: E-mail validation
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.

Please Log in to join the conversation.

More
4 years 11 months ago #90417 by mimi
mimi replied the topic: E-mail validation
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.

Please Log in to join the conversation.

More
4 years 11 months ago - 4 years 11 months ago #90421 by DenisChenu
DenisChenu replied the topic: E-mail validation
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 development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Last Edit: 4 years 11 months ago by DenisChenu. Reason: SQG

Please Log in to join the conversation.

More
4 years 11 months ago #90984 by mimi
mimi replied the topic: E-mail validation
ok. Thank You s0 much.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!