here i have a form email validation but its in server side i want it in client side (Real time Validation).
i want form validation for business email Checking. its nere accept gmail.com, yahoo, bing, yopmail , like public provides
LtsCustomerRegistration.prototype.handleEvents = function () {
var _this = this;
$(".btn-next-step-1").click(function() {
_this.step1Validation.validate().then(function (status) {
if (status == 'Valid') {
var step1FormData = LtsMain.formSetData('#CustomerSignUpFormStep1');
_this.customerSignUp(step1FormData, function(res){
$('#customer_id_hidden').val(res.customerId);
_this.switchTabs(2);
},
function(res){
if(res.status === 'user_exist'){
$('#customer_email').parents('.form-group').find('.email-exists-validation-msg').removeClass('d-none');
$('#multi-step-form').animate({
scrollTop: 0
}, 1000);
} else if(res.status === 'invalid_email'){
$('#customer_email').parents('.form-group').find('.email-invalid-validation-msg').removeClass('d-none');
$('#multi-step-form').animate({
scrollTop: 0
}, 1000);
}
});
}
});
});
this validation is Check the user email invalid or not, in the submit button Click
this pass to a method in symfony "customerSignUp"
here is validation is client side real time validation.
2
Answers
fullcode
Try This..