Brian Dunning's FileMaker Custom Functions

Email_FormatValidityTest ( someEmail )

Tests email format validity, giving a message about result.

  Be the first to rate this function Log in to vote

Dan Shockley   Dan Shockley - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
Email_FormatValidityTest ( " )
  Sample output:
"email address is valid"

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

This function returns the "email address is valid" if the specified email uses valid syntax.
It returns a descriptive error message if something invalid is found.
It is an updated version of a function by Paul Turnbull (, including ideas by Michael Rhodes (
It does NOT try to check for validity of the top-level domain (TLD) against some defined list, as that can change. It instead only checks for valid syntax.
Note that it does not allow certain rarely-used special characters in the local part that can be used if quoted or escaped, as that would increase complexity (have to test for valid escaping/quoting).

If you want a function that just returns True or False, you could either make a simpler custom function that calls this one, testing for the "email address is valid" message, or you could change the end of this function to: resultMsg = "email address is valid"



Log in to post comments.


Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 19 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: