Jump to content


Invalid e-mail when entering the chat or leaving a message [Solved]


5 replies to this topic

#1 fabiobr

    Advanced Member

  • Members
  • PipPipPip
  • 136 posts

Posted 14 February 2017 - 12:58 PM

Hi!

When visitors are entering the chat or leaving a message, some of them type a wrong e-mail address (ie. only the words before @, or "email@domain" - without ".com", etc)

Today I am trying to use the validation method you provide in configuration. Here is what I have so far:

1. Created a valid_email.php file with this content:
function validateEmail($email) {
	return filter_var($email, FILTER_VALIDATE_EMAIL);
}

if (($_GET["inputid"] == "112") && validateEmail($_GET["value"])) {
	echo "lz_validate_input_result(true,112);";
	exit();
} else {
	echo "lz_validate_input_result(false,112);";
	exit();
}

2. Uploaded it to the "_lib" Livezilla folder;

3. Activated the validation of the entering field "Email" and added this information:

- Validation URL: http://www.domain.co...ue=<!--value-->

- Server response on success: lz_validate_input_result(true,112);

- Server response on failure: lz_validate_input_result(false,112);

4. Saved and closed all configuration windows. Also logged off and on...


When entering the url http://www.domain.co...e=test@test.com direct in the navigator address bar, it works, I receive the result "lz_validate_input_result(true,112);". But when trying in the chat it does not work.... Please, do you know what I am doing wrong?


Thanks! Regards,


Fabio

#2 fabiobr

    Advanced Member

  • Members
  • PipPipPip
  • 136 posts

Posted 15 February 2017 - 10:36 PM

Hi again,

Checking the last update 7.0.2.5 in the Change Log I saw this: "Bugfix: Data Pass-thru not working when using different codes (with data and without)". Is this related with this topic?


Thanks!

#3 fabiobr

    Advanced Member

  • Members
  • PipPipPip
  • 136 posts

Posted 17 June 2017 - 11:05 PM

Hello!

After some update (I don't know which) this validation stop working on the "on-site" chat. In the "off-site" chat window is working as usual. Please, can you check?



Thanks! Regards,

Fabio

#4 Patrick Keil

    Administrator

  • Administrators
  • 3187 posts
  • LocationSingen, Germany

Posted 19 June 2017 - 08:57 AM

Which LiveZilla version do you use?

On-Site and Off-Site share the same code base in LiveZilla 7.x so the function should work in both situations or not at all.

#5 Patrick Keil

    Administrator

  • Administrators
  • 3187 posts
  • LocationSingen, Germany

Posted 19 June 2017 - 09:07 AM

I have tested your script and it works fine for me, on-site + off-site.

#6 fabiobr

    Advanced Member

  • Members
  • PipPipPip
  • 136 posts

Posted 19 June 2017 - 06:16 PM

Ok, I found the problem. My mistake, sorry!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users