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 8 + 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. sql.getTable ( fullyQualifiedFieldObject )
  (Thu, Feb 22, 8:36am)
2. sql.getField ( fullyQualifiedFieldObject )
  (Thu, Feb 22, 8:34am)
3. FilterOut ( ListA ; ListB )
  (Wed, Feb 21, 6:11pm)
4. Char0 ( )
  (Sun, Feb 18, 2:35am)
5. CreateVCardFile ( FirstName ; LastName ; CompanyName ; Phone ; Email ; WEB ; hAddress1 ; hAddress2 ; hZip ; hCity ; hCountry ; wAddress1 ; wAddress2 ; wZip ; wCity%2
  (Sun, Feb 18, 1:50am)
6. AccurateAge (start; end )
  (Tue, Feb 13, 5:41am)
7. fnParser_UnCertain(text;firstSymbol;secondSymbol;SN)
  (Mon, Feb 12, 11:10pm)
8. sql.whereInList.asList ( fqFieldToReturn ; fqFieldToMatch ; listOfValuesToMatch )
  (Wed, Feb 07, 2:03pm)

RSS Feed of Custom Functions