"first proto"
This commit is contained in:
19
static/scripts/participate.js
Normal file
19
static/scripts/participate.js
Normal file
@@ -0,0 +1,19 @@
|
||||
function register() {
|
||||
var mail = document.getElementById('reg_mail').value;
|
||||
var password = document.getElementById('reg_password').value;
|
||||
var confirm = document.getElementById('reg_confirm').value;
|
||||
var regEmail = new RegExp('^[0-9a-z._-]+@{1}[0-9a-z.-]{2,}[.]{1}[a-z]{2,5}$','i');
|
||||
if (password.length < 8){
|
||||
alert("Le mot de passe doit avoir une longueur d'au moins 8 caractères");
|
||||
return false;
|
||||
}
|
||||
if (password != confirm){
|
||||
alert("Confirmation mot de passe incohérente");
|
||||
return false;
|
||||
}
|
||||
if (! regEmail.test(mail)){
|
||||
alert("Adresse email invalide");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user