Page 1 of 1

How do I force the signup to be the user's email?

Posted: Sat Oct 11, 2014 12:37 am
by Logan Wells

Hello,

I am trying to force the users for when they sign up it needs to be an email. After creating a (working) signup service, I added JavaScript in the "Before Send" row located under the signup service:

var username = Appery('username').val();

function validateEmail(email) {
if (email === "") {
alert("Please enter an email address");
return; //return user to fix email address
}
var reg = /[A-Za-z0-9-.]+@([A-Za-z0-9-.])+.([A-Za-z]{2,4})$/;
if (reg.test(email) === false) {
alert('please enter a valid email address');
return;
}
}
validateEmail(username);

Is this code correct? Or is there something else I am missing?
Thank you guys so much in advance for answering, it means so much to have an amazing customer service got my back!


How do I force the signup to be the user's email?

Posted: Sat Oct 11, 2014 3:48 am
by Illya Stepanov

Hi Logan,

Please check this forum topics, let us know if they helped:
:: https://getsatisfaction.com/apperyio/...
:: https://getsatisfaction.com/apperyio/...


How do I force the signup to be the user's email?

Posted: Mon Oct 13, 2014 4:36 am
by Yurii Orishchuk

Hi Logan,

You can place this code in new Javascript asset.

And then on button click you can use following code:

pre

var userName = Apperyio("userNameInput").val();

//If userName from input email
if(validateEmail(userName)){
//Execute service
service.execute();
}
else{
alert("User name should email");
}

/pre

That's all

Regards.


How do I force the signup to be the user's email?

Posted: Mon Oct 20, 2014 6:54 pm
by Logan Wells

Thank you so much!

I am so happy there is such a strong customer support team at Appery!


How do I force the signup to be the user's email?

Posted: Mon Oct 20, 2014 7:03 pm
by Kateryna Grynko

Hi Logan,

Thank you for the feedback!


How do I force the signup to be the user's email?

Posted: Mon Jul 20, 2020 2:13 pm
by Logan Wells

;:\s@\""]+)*)|(\"".+\""))@((\[[0-9]{1


How do I force the signup to be the user's email?

Posted: Mon Jul 20, 2020 2:13 pm
by Logan Wells

;:\s@\""]+)*)|(\"".+\""))@((\[[0-9]{1