Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

EMail syntax validation with CF

Featured Replies

Paul Turnbull, Canada, posted Oct 13 2005 a CF to check the syntax of an email address ( Brian Dunning Custom Functions)

The custom function has some quirks that have to be ironed out. See example file.

Who can help to perfect the CF?

EMail_Is_Valid.zip

  • Author

Paul Turnbull improved the function himself. What needs refinement are email addresses like

[email protected]/Hans.Muster

The validate function does not validate these.

Here the improved function (see attachment).

EMail_Extractor_SOGETES_1.0.1.zip

Edited by Guest

Hi

I can't agree with your "Strip" variable in your EMail_Extractor...

Nobody have to write an email address in the form:

to:[email protected] aka without the space between "to:" and the real email !

But, if someone writes so badly, the same one can write:

##[email protected] or

Look at this kind [email protected] ...

So your attempt to eliminate the chars: ":<>=;" before the real email is [color:red]at least incomplete !

Nor can i agree with your "validEMailCharacters" variable that is useless !

It seems to me as you wanted to makes some changes only to write: Ralph Nusser into my CF ! :)

BTW I have to thank you for the citation of the [color:green]ORIGINAL GetEmail() CF !

  • 10 months later...

Yes, Genx

NO ONE of the above strings is a valid email address... they only contain the address !

What about:

GetEmail(Substitute(text;""";" ") ?

Hi Danielle,

I'm a bit confused?

You mean they aren't valid according to the original CF or they aren't valid email addresses full stop?

Hi Genx

the second you said ! :D

The strings:

1)[ [email protected]" ]

2)[ "[email protected] ]

3)[ "[email protected]" ]

are invalid Email addresses because they contains the " character.

This is from: http://www.developer.com/lang/php/article.php/3290141

1)An email address must follow the pattern: @.

2)The username can consist of the letters a through z, the numbers 0 through 9, and the underscore ('_'), hyphen ('-'), and period ('.') characters. Furthermore, the username cannot begin or conclude with a period.

3)The domain part follows the same rules as those specified for the username.

4)The tld, acronym for "top-level domain" can consist solely of one or more sequences of the letters a-z, each separated by a period. Furthermore, the suffix must begin with a period, and cannot conclude with a period. Finally, the suffix must be a valid Internet domain suffix as approved by the Internet Assigned Numbers Authority (IANA). Examples include ".com", ".net", ".co.uk", ".tv", and ".ca". If you're interested, IANA's Web site offers a comprehensive list of all valid TLDs.

5)Email addresses are case-insensitive.

Hi Danielle,

I had realized about the quote character, i was simply using it to show the presence of a space :D

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.