My internal check only accepts 1 parameter: email
When I look at Firebug, I see that the request URL sends 2 parameters:
https://example.com/rest/checkDupEmail?newEmail=myEmail%40myEmail.com&email=
Here is the verification code ...
HTML
<input type="textbox" name="newEmail" id="newEmail"/>
Js
validator = $('#emailForm').validate({
rules: {
newEmail: {
required: true,
remote: {
url: '/rest/checkDupEmail',
data: { email: $('#newEmail').val()},
dataFilter: function(data) {
var json = JSON.parse(data);
console.log($('#newEmail').val());
console.log(data);
}
}
}
}
});
As if he takes the HTML field that I specify (newEmail) and send it as a parameter?
source
share