0
hi guys
what should be the ' if' condition if I want to show error in the form validation like if there are space between the alphabets then show no space between letter else success if (email.value=="") { console.log(error) } what should be the condition to show the error no space between letters
1 Respuesta
0
You can use includes() méthode :
if(email.includes(" ")) {
console.log(error)
}
Or use test() method with regex if you want to add more conditions