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.

Click here to copy To Clip Manager if you have myFMbutler's Clip Manager installed

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 2 + 8 =
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. interpolation (y1; y2; y3; x1; x2; x3; x1y1; x2y1; x1y2; x2y2; rnd)
  (Sat, May 19, 3:55am)
2. @JSONFormatElements ( json )
  (Tue, May 15, 3:31am)
3. WindowNamesAll ( dbNames ; excludeCurrentWindow )
  (Sat, May 12, 11:34am)
4. RandomChoiceFromList ( values ; required )
  (Wed, May 02, 6:35am)
5. @JSONFormatElements ( json )
  (Fri, Apr 27, 7:31am)
6. MBS-OCR ( language ; Image )
  (Mon, Apr 23, 1:48pm)
7. MBS_Image_Rotate ( Picture ; rotation )
  (Mon, Apr 23, 1:27pm)
8. UnQuote ( string )
  (Tue, Apr 10, 12:34pm)

RSS Feed of Custom Functions