Skip to main content
haripriyas
September 1, 2021
Question

validateemailaddress() ?

  • September 1, 2021
  • 11 replies
  • 2 views

What all cases are covered while using validateemailaddress() ?

11 replies

stefanhelzle0001
Brainy
September 1, 2021

As this is no function of the Appian product, you would need to check the code.

September 1, 2021

you can get the list of valid emails from google http://softwaretesterfriend.com/manual-testing/valid-invalid-email-address-format-validation/

Tried some based on the valid email format mentioned in the site for some it didnt work.

August 17, 2022
[deleted]
mikes0011
Brainy
August 17, 2022

nice try...

Mike Schmitt, First Annual Live-Build Challenge Loser™️
December 13, 2022

No all the cases will not be covered using that function. 

You can use the below regex expression to check that 

"^[a-zA-Z0-9+_.-]+@[a-zA-Z0-9.-]+$"
December 14, 2022

for validating email address you can use this regex 

regexmatch("^[\w\.\-]+@[\w\.\-]+\.[\w\.]{2,}$",ri!input)

mikes0011
Brainy
December 16, 2022

This pattern fails a bunch of the test cases I have set up in my Validate Email Addresses expression rule.  Two of the most obvious/important failure cases is that it doesn't return "false" for email addresses beginning or ending with extraneous periods (".").

This is the pattern I use in mine, which passes a rather rigorous 18 test cases (though i can't guarantee it passes all realistic ones, just the ones i've been able to think of).

regexmatch(
  pattern: "^[A-Z0-9\'\+\&\%_-]+(\.{0,1}[A-Z0-9\'\+\&\%_-]+)*[@]{1}[A-Z0-9.-]*[A-Z0-9-]+[.]{1}[A-Z]{2,6}$",
  searchString: ri!email,
  regexFlags: "si"
)

Also note: all of the above test cases also correctly pass using the "validateEmailAddress()" function from People Functions, for what it's worth.

Mike Schmitt, First Annual Live-Build Challenge Loser™️
davinar9817
December 16, 2022

Is there a way to display a message instead of a boolean value with this?

zeldat7413
March 17, 2023
[deleted]
March 17, 2023