fine tune servside email validation
This commit is contained in:
@@ -20,11 +20,11 @@ function checkEMail(theEmailAddress){
|
||||
},
|
||||
error:function(jqXHR,status,error){
|
||||
console.log("send-error method mailcheck ",jqXHR,status,error);
|
||||
def.reject(jqXHR);
|
||||
def.resolve(jqXHR); // in case the server is not reachable I resolve it... not optimal but better than locking out clients.
|
||||
}
|
||||
});
|
||||
} else {
|
||||
def.reject("{status:'error', msg:'pattern not matching e-mail format.'}")
|
||||
def.reject("{status:'err', error:'pattern not matching e-mail format.'}")
|
||||
}
|
||||
return def.promise();
|
||||
}
|
||||
@@ -35,6 +35,7 @@ function nextHandler(){
|
||||
window.location="#Sell/page2/";
|
||||
}).fail(function(data){
|
||||
if (ibuyproperties.isDebugMode) { console.log("EMail Wrong"); }
|
||||
$("#alertInvalidEMailError").text(data.error);
|
||||
$("#alertInvalidEMail").removeClass("hide");
|
||||
console.error("E-Mail check error",data)
|
||||
});
|
||||
@@ -45,7 +46,7 @@ function nextHandler(){
|
||||
<div id="alertInvalidEMail" class="alert alert-danger hide" role="alert">
|
||||
<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
|
||||
<span class="sr-only">Error:</span>
|
||||
A valid email address is required.
|
||||
A valid email address is required. Error-Description: <span id="alertInvalidEMailError"></span>
|
||||
</div>
|
||||
<div class="input-group" style="width:100%">
|
||||
<span class="input-group-addon fixWidth1 fieldLabel" >First Name</span>
|
||||
|
||||
Reference in New Issue
Block a user