IsValidEmail ( text )
Rate this function: Average rating: 2.6 (24 votes) Discuss this Custom Function
Michael Rhodes, Allied Data Service
http://allieddataservice.com
test if valid email for format and against current top level domains
Sample Input:
| IsValidEmail ( "Rhodes.MichaelC@gmail.com" ) |
|
Sample Output:
|
Description:
IsValidEmailFormat is a better choice in most situations, since top level domains are constantly created. However, for those who want to test both the format of the email and make sure the top level domain is legitimate according to the current list as of creation date, here is this alternative.
Note: these functions are not guaranteed
or supported by BrianDunning.com. Please contact the individual
developer with any questions or problems.
This is my Custom Function and I want to
edit it
Discuss:5 most recent comments | Show all 10 comments Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:
|
Newest Custom Functions:
| 1. |
phpArrayValue ( array ; key ; pos ) |
| |
(Fri, Jan 27, 1:49pm) |
| 2. |
solfm_timeToMinutes (theTime;roundSec) |
| |
(Fri, Jan 20, 6:26am) |
| 3. |
filterLines(filterField;filterValue;Result) |
| |
(Sat, Jan 14, 2:20pm) |
| 4. |
getMaxValue ( theList ) |
| |
(Thu, Jan 12, 1:06pm) |
| 5. |
MiddleWordsIncPunct ( text ; startingWord ; numberOfWords ) |
| |
(Sat, Jan 07, 9:16am) |
| 6. |
WindowInfo |
| |
(Fri, Jan 06, 12:39pm) |
| 7. |
CenterWindow in Window vert horiz (demension) |
| |
(Fri, Jan 06, 12:25pm) |
| 8. |
UTF8_to_TXT ( Text , Platform ) |
| |
(Wed, Dec 28, 10:44pm) |
 |
|
Very useful function, but name.surname@dom.city.it return 0
i have modified your function with:
posDom = Position ( email; "@"; 1; 1 ) + 1 ;
user = Left ( email; posDom - 2 ) ;
nrDotUser = PatternCount ( user; "." );
nrDot = PatternCount ( email ; "." );
posTLD = Position ( email; "."; posDom + 1; nrDot - nrDotUser ) ;
dom = Middle ( email; posDom; posTLD - posDom ) ;
tld = Right ( email; Length ( email ) - posTLD )
now it's work ;-)
Paolo Casagrande, Trento - Italy
April 22, 2010 3:17am