Page 1 of 1

Verify the mail address characters...

Posted: Sat Jul 09, 2005 2:18 pm
by Sacapuss
Hi !

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)
}
}
}
See http://lamaisonbrulee.chez.tiscali.fr/index.php?ecrire

Thanx for your help !

Re: Verify the mail address characters...

Posted: Wed Sep 07, 2005 12:23 pm
by J_Iceman05
Sacapuss wrote:Hi !

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&#1111;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)
}
}
}
See http://lamaisonbrulee.chez.tiscali.fr/index.php?ecrire

Thanx for your help !
If you are not getting the information you want, that may be because you do not understand english well enough.
Read the following, you have all the info you need

viewtopic.php?t=35404&highlight=mail+java
viewtopic.php?p=184866