I am doing an email registration form as a training exercise, and I would like to check with jquery that the address is correct.
so far I have been able to write the following code:
var validateEmail = function(email){
  if(email.includes(' ')){return false};
  if(!email.includes('@')){return false};
  return true;
}
this code works perfectly, but unfortunately the form is validated when there is not the last part of the address, that is to say: ".com" ".fr" etc .. being all new in development if someone could give me a track please :)
I thank you in advance !
 
     
     
     
    