Loqate Validation

  • 21 September 2018
  • 3 replies
  • 13 views

Hello!

I have come across the validation service https://www.loqate.com/, It was very simple to set up on the landing page but I was just wondering if anyone had used this before?

The only problem I have found is that even if the validation works and says the email address is incorrect, the user can still submit the form. Wondered if anyone had come across a workaround for this.

Many thanks,


3 replies

Userlevel 7
Badge +3

Hi @weareleads,

You should take a look at this thread for more information on how to manipulate the default submit process.

Best,
Hristian

This may help you. You can capture the “data” event from the Logate “pca” object.

var email_valid = false;
var mobile_valid = false;

//Capture PCA validation
pca.on("data", function(a,b,c){
  console.log('Data Event');
  if (a === "emailvalidation"){
    email_valid = (c===false) ? false : true;
  };
  if (a === "mobilevalidation"){
    mobile_valid = (c===false) ? false : true;
  };
  console.log('Email valid: ' + email_valid);
  console.log('Mobile valid: ' + mobile_valid);
});

The use the email_valid and mobile_valid semaphores to decide whether to submit or not.

Userlevel 5
Badge +4

Great thread, as i’m facing the same problem as @weareleads.

@Arnold_Bailey thanks for your code, but where exactly do you add it ?
Is it on the link submited by @Hristian (here?)

thanks

Reply