Verify the mail address characters...

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
Sacapuss
Forum Commoner
Posts: 40
Joined: Mon May 16, 2005 9:46 pm
Location: Earth...

Verify the mail address characters...

Post 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 !
User avatar
J_Iceman05
Forum Commoner
Posts: 72
Joined: Wed Aug 03, 2005 10:52 am
Location: Las Vegas, NV

Re: Verify the mail address characters...

Post 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
Post Reply