You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the user submits the play form, we should check against all players retrieved by that page. If the contact info is duplicate, we should not let the user submit.
The text was updated successfully, but these errors were encountered:
When loading all players, their emails are kept in a global contacts variable. Just for raising a bit difficulty in getting all players' emails, a hashCode function is implemented.
var email = rpi[3].split(":")[1].trim();
contacts.push(hashCode(email))
When submit, the input email will be checked. For better usability, regex checking email format is also added:
if (contacts.indexOf(hashCode(contactId)) !== -1){
tip.error(lgb.contact_error);
return;
}
if (!validateEmail(contactId)){
tip.error(lgb.email_error);
return;
}
When the user submits the play form, we should check against all players retrieved by that page. If the contact info is duplicate, we should not let the user submit.
The text was updated successfully, but these errors were encountered: