View Single Post
Old 11-06-2004, 12:08 PM  
Lace
Too lazy to set a custom title
 
Lace's Avatar
 
Industry Role:
Join Date: Mar 2004
Posts: 16,116
Quote:
Originally posted by V_RocKs
Right, and you shouldn't use javascript to clean up form values. If I turn it off or post it from my own server, you are kinda screwed.

PHP Code:
function emailCheck (emailStr) {
var 
emailPat=/^(.+)@(.+)$/
var 
specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
var validChars="\[^\\s" specialChars "\]"
var quotedUser="(\"[^\"]*\")"
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
var 
atom=validChars '+'
var word="(" atom "|" quotedUser ")"
var userPat=new RegExp("^" word "(\\." word ")*$")
var 
domainPat=new RegExp("^" atom "(\\." atom +")*$")
var 
matchArray=emailStr.match(emailPat)
if (
matchArrayhahahahanull) {
    
alert("Email address seems incorrect (check @ and .'s)")
    return 
false

icq me, 303-634-866
__________________
Your Paysite Partner
Strength In Numbers!
StickyDollars | RadicalCash | KennysPennies | HomegrownCash
Lace is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote