Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2021 10:51 PM
Other than using "email type" as a field, below background script always helped me for email validation.
Use this and customize wherever you need to validate email.
// Get email address from field
var emailAddress= "123gmail.com";
//If Email address is valid, take some aciton.For example printing success message below
if (/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))+$/.test(emailAddress)){
gs.info("Valid Email Address");
}
//If Email address is not valid, stop form submission or take some action
else{
gs.info("The email address format is invalid");
}
Regards
Pawan K Singh