Verify the mail address characters...
Posted: Sat Jul 09, 2005 2:18 pm
Hi !
Could anyone let me know why the hereunder function lets the ' ' throught ?
See http://lamaisonbrulee.chez.tiscali.fr/index.php?ecrire
Thanx for your help !
Could anyone let me know why the hereunder function lets the ' ' throught ?
Code: Select all
function car_verifier(input)
{
longueur=input.value.length
if(longueur>0)
{
k=input.valueїlongueur-1]
if(!(k>='a' && k<='z') && !(k>='A' && k<='Z') && !(k>=0 && k<=9) && k!='@' && k!='_' && k!='-' && k!='.')
{
alert('Le caract?re \''+k+'\' ne semble pas valide !')
input.value=input.value.slice(0, longueur-1)
}
}
}Thanx for your help !