11-06-2004, 12:08 PM
|
|
|
Too lazy to set a custom title
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
|
|
|