$vie - IP, Email Validator

By h3lp on Mar 07, 2005

Usage


$vie(string) = Return the email/ip address IF valid.

$vie(string,v) = Return "1" for valid, and "0" for NOT.

string = could be anything, %var or any text.

v = return value. 1 or 0.

alias vie {
  var %v
  $iif($regex($1,/(((\d{1,3})\.){3,4}\d{3,4})/sig),%v = $regml(1),$iif($regex($1,/((\w){1,}\@{1}+(\w){1,}+(\.){1}+([A-Za-z]{2,3}))/sig),%v = $regml(1)))
  $iif($2 == v,$iif(!%v,%v = 0,%v = 1),$iif($2,%v = ""))
  return %v
}

Comments

Sign in to comment.
tye   -  Mar 13, 2005

This doesn\'t work very well. I use $vie(999.999.999.999) and it said it was valid.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.