Well, this is too simple, there are too many invalid strings which are
considered as valid by this script. I think if you validate the input,
then do it correctly or don't validate at all :) An incomplete
validation makes you feel that your data is valid and secure, however
it can lead to unexpected problems later.

  Attila

JB> I got a much simpler one:
JB> 
JB> Check for invalidity:
JB> 
JB> // ti = text input field
JB> if((ti.text.indexOf("@") == -1) || 
JB> (ti.text.indexOf(".",(ti.text.indexOf("@")+2)) == -1) ) {
JB>     // email is invalid
JB> }
JB> 
JB> OR...
JB> 
JB> Check for validity:
JB> 
JB> // ti = text input field
JB> if((ti.text.indexOf("@") != -1) && 
JB> (ti.text.indexOf(".",(ti.text.indexOf("@")+2)) != -1) ) {
JB>     // email is valid
JB> }


_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to