Software Venture Consulting

FileMaker Pro downloads & Resources
FileMaker Custom Functions
FileMaker Web Viewer Examples
FileMaker Pro & Lasso Consulting
Training
FileMaker Books
FileMaker Articles
FileMaker Error Reference

Free Web Tools
Free FileMaker Tools

Personal Pages
Videos
Adventures
Links

Shopping Cart
Shopping Cart

Search:

Free Newsletter
Signup


Contact


Privacy Policy



FileMaker is a registered trademark of FileMaker, Inc. in the U.S. and other countries.

 

 FileMaker Pro Custom Functions

List  |  Show Random  |  Upload  |  Add This to Your Site

IsValidEmailFormatƒ ( _email )

Rate this function:  

RatingRatingRatingRatingRating
  Average rating: 3.7  (55 votes)
  Discuss this Custom Function

Michael Rhodes, Allied Data Service
http://allieddataservice.com

Validate email address

Sample Input:
IsValidEmailFormatƒ ( "mike@allieddataservice.com" )
Sample Output:
1


 Then copy & paste into FileMaker Advanced's Edit Custom Function window.

Description:

Purpose

Since the number of top-level domains increases over time, this function assumes the top-level domain is legitimate and prohibits invalid email formats caused by other data entry error.

Returns 1 if the parameter is a correctly formatted email address.

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 21 comments

_email is the name of the passed parameter. If you choose to name the parameter "text", then yes you will have to add _email = text in the let statement.

Michael Rhodes, Colorado Springs, USA
March 17, 2017 11:33am

Thank you

Caught my mistakes

Florence Haseltine, Alexandria VA
December 15, 2017 5:13pm

A warning that this function does not look for bad characters in the domain portion.

Example: test@a!!!a.com returns true

My fix:

/*
Created by Michael Rhodes 2008-10-12
Updated 2017-03-17
mike@allieddataservice.com

This function assumes top-level domain is legitimate and validates only the email format.
Returns 1 if parameter (_email) is correctly formatted.
*/

IsEmpty ( _email ) or // Comment out this line if you want to prohibit null values.
Let ( [
_alphanum = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" ;
_email = Trim ( _email ) ;
_posAt = Position ( _email ; "@" ; 1 ; 1 );
_localpart = Left ( _email ; _posAt - 1 );
_domain = Middle ( _email ; _posAt + 1 ; 99999 )
] ;
Filter ( _localpart ; _alphanum & "!#$%&'*+-/=?^_`{|}~" ) = _localpart // There are no invalid characters in local part.
and Filter( _domain ; _alphanum & ".-" ) = _domain //There are no invalid characters in the domain.
and PatternCount ( _email ; "@" ) = 1 // There is only one @ symbol.
and Length ( Filter ( Left ( _email ; 1 ) & Middle ( _email ; _posAt - 1 ; 3 ) & Right ( _email ; 1 ) ; _alphaNum ) ) = 4 // First and last character are alphanumeric.
and not PatternCount ( _email ; ".." )
and Position ( _email ; "." ; _posAt + 2 ; 1 )
)

Carson Lind, Minneapolis, MN
February 12, 2018 12:03pm

Does not work. Every time I get errors. I have it set up in a field validation with everything accurate.

Christopher Augustin, Palm Desert
February 14, 2018 5:41am

Missed the period in local part validation:


/*
Created by Michael Rhodes 2008-10-12
Updated 2017-03-17
mike@allieddataservice.com

This function assumes top-level domain is legitimate and validates only the email format.
Returns 1 if parameter (_email) is correctly formatted.
*/

IsEmpty ( _email ) or // Comment out this line if you want to prohibit null values.
Let ( [
_alphanum = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" ;
_email = Trim ( _email ) ;
_posAt = Position ( _email ; "@" ; 1 ; 1 );
_localpart = Left ( _email ; _posAt - 1 );
_domain = Middle ( _email ; _posAt + 1 ; 99999 )
] ;
Filter ( _localpart ; _alphanum & ".!#$%&'*+-/=?^_`{|}~" ) = _localpart // There are no invalid characters in local part.
and Filter( _domain ; _alphanum & ".-" ) = _domain //There are no invalid characters in the domain.
and PatternCount ( _email ; "@" ) = 1 // There is only one @ symbol.
and Length ( Filter ( Left ( _email ; 1 ) & Middle ( _email ; _posAt - 1 ; 3 ) & Right ( _email ; 1 ) ; _alphaNum ) ) = 4 // First and last character are alphanumeric.
and not PatternCount ( _email ; ".." )
and Position ( _email ; "." ; _posAt + 2 ; 1 )
)

Carson Lind, Minneapolis, MN
February 15, 2018 6:58pm

Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:

Your Name:
City/Location:
Comment:
characters left. If you paste in more than 1500 characters, it will be truncated. Discuss the function - advertisements and other useless posts will be deleted.
Answer 3 + 4 =
Search for Custom Functions:

Custom Functions Widget
Download the Custom Function Dashboard Widget for OS X
Keep all the latest Custom Functions right at your fingertips!

Newest Custom Functions:

1. ChiSquare3x2 ( param ; param ; param ; param )
  (Tue, Aug 14, 6:33am)
2. ReverseByteOrder ( bytes )
  (Thu, Aug 09, 12:06pm)
3. BytesToDec ( hex )
  (Thu, Aug 09, 11:47am)
4. GetAsHexBytes ( number ; bytes )
  (Thu, Aug 09, 10:50am)
5. ValCorrelationCoeff ( XValueList; YValueList; Xmean; Ymean; XStdDev; YStdDev )
  (Wed, Aug 08, 4:17pm)
6. ValLeastSquaresSlope ( XValueList; YValueList; Xmean; Ymean )
  (Wed, Aug 08, 4:10pm)
7. ValueMath ( List1 ; List2 ; operation )
  (Wed, Aug 08, 4:05pm)
8. GetExtension ( File )
  (Tue, Aug 07, 10:22am)

RSS Feed of Custom Functions