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.

Help with Email Validation

Featured Replies

Hello

 

I have an email field in a Clients table that I would like to ensure has a valid email address to avoid any issues with typos and such

 

I'm not quite sure how I would go about doing this

 

Also, the field needs to be able to be empty as well

 

 

  • Author

I guess im just looking to make sure that it has an "@" and a period in it.

 

I found this through google, and it seems to work well:

Let ([ L = Length ( Self ) ;                                   // get length of eMail address
         At = Position ( Self ; "@" ; 1 ; 1 ) ;                // Find at least one @ signred
         Period = Position ( Self ;"." ;L ; -1 ) ] ;           // Find at least one period from a right to left search
         At > 1 and At < ( Period - 2 ) and Period < (L - 1)   // Return boolean T/F if @ and period were found in a normal email range
       )

But how do I allow the field to be empty as well?

Biiiink,

 

Have you done a search at http://www.briandunning.com for email?

 

There are a ton of Custom Functions that deal with all aspects of parsing email addresses.

 

HTH

Lee

I guess im just looking to make sure that it has an "@" and a period in it.

 

That could be done very simply by =

 

PatternCount ( Self ; "@" ) and PatternCount ( Self ; "." ) or IsEmpty ( Self )

 

 

 

But how do I allow the field to be empty as well?

I didn't test your calculation, but I believe you could simply add:

...   or IsEmpty ( Self )

to the final line?

  • Author

What I posted above seems to work for my purposes.

 

I've put it in the Validate by Calculation section for the Email Field, but again, how do I allow the field to be empty and it not return an error?


 

I didn't test your calculation, but I believe you could simply add:

...   or IsEmpty ( Self )

to the final line?

 

hmmm...I thought I tried that earlier and it didn't work, but it works now.  I must have done something wrong the first time.

 

Thanks for your help

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.