mirror of
https://github.com/pierre42100/ComunicWeb
synced 2025-07-13 14:38:09 +00:00
Added mail caching system
This commit is contained in:
@ -33,7 +33,7 @@ ComunicWeb.common.formChecker = {
|
||||
|
||||
//MailInput
|
||||
else if(inputType == "email"){
|
||||
inputOK = input.value.match(/^[a-zA-Z0-9_.]+@[a-zA-Z0-9-]{1,}[.][a-zA-Z]{2,3}$/);
|
||||
inputOK = checkMail(input.value);
|
||||
}
|
||||
|
||||
//Password input
|
||||
|
@ -334,6 +334,14 @@ var ComunicWeb = {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Mails caching component
|
||||
*/
|
||||
mailCaching: {
|
||||
//TODO : implement
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -31,6 +31,16 @@ function byId(nodeName){
|
||||
return document.getElementById(nodeName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check a given email address
|
||||
*
|
||||
* @param {String} emailAddress The email address to check
|
||||
* @return {Boolean} True for a valid email address / false else
|
||||
*/
|
||||
function checkMail(emailAddress){
|
||||
return (emailAddress.match(/^[a-zA-Z0-9_.]+@[a-zA-Z0-9-]{1,}[.][a-zA-Z]{2,5}$/) === null ? false : true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a quick language access function shorcut
|
||||
*/
|
||||
|
Reference in New Issue
Block a user