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.

How can create script for Is Valid Email ( the mail )

Featured Replies

Hi all,

I would like to create a script or function for the Email field in case the entry of the email without @ give him an error or an invalid address.

 

thanks a lot for any help or support :) 

  • Author

Actual I created function but while filling the field correct e-mail give me No. 1 instead of e-mail.

 

945687734_correctemail.png.d4af104a5849c71aa861f2227a5e1fd2.png

 

the result :) 

 

1.png.ff752719f49a4b7d91acd2dcd3fa10b6.png

I suggest you start with something simple: validate the email field using a calculation =

PatternCount ( Self ; "@" )

This will produce a validation error when you try to commit a record where the email field does not contain the @ character.

Now, this simple solution has several flaws:

  1. It fires on record commit, not when user exits the field;
  2. The error message can be cryptic and confusing to the user;
  3. There are many other ways in which an email address can be invalid.

To solve the first two problems, you can attach an OnObjectValidate script trigger to the field and have it run a script along the lines of:

If [ not PatternCount ( YourTable::Email ; "@" ) ]
  Show Custom Dialog [ "The email is not valid." ]
  Exit Script [ Result: False ] 
End If

IMPORTANT
Script triggers work only on layouts where they have been installed. If you want to ensure data integrity, use the script trigger in addition to field validation, not instead of it.

The third problem is much more complicated and I won't go into it now.

 

Edited by comment

  • Author

I created as per mentioned but unfortunately still if e-mail correct given me No. 1  :(

  • Author

Your are super FM is working fine in future I will update  :) Please I hope to visit this link :

 

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.