<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Way to Validate Email Addresses</title><link>https://community.appian.com/discussions/f/administration/7353/way-to-validate-email-addresses</link><description>Hello Everyone: I was wondering if anyone has developed a way to validate email addresses? 
 OriginalPostID-204914 
 OriginalPostID-204914</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Way to Validate Email Addresses</title><link>https://community.appian.com/thread/89654?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 17:08:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:83999f62-f934-4e44-8098-259ae2271a79</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Since this zombie thread has already been dredged back up anyway....&lt;/p&gt;
&lt;p&gt;A while ago I switched to a regex-based validation solution because despite the best updates to the OOB approach posted below originally, there were still corner cases that were hard to handle sufficiently without the inherent power of RegEx matching.&lt;/p&gt;
&lt;p&gt;The RegEx originally posted by Shailendras almost 6 years ago fails in some valid and common corner cases, including name or domain parts with multiple pieces separated by &amp;quot;.&amp;quot;, such as &amp;quot;mike@mail.appian.com&amp;quot; etc.&lt;/p&gt;
&lt;p&gt;Eventually I was able to work up the following RegEx match function by a combination of a few different sources and my own testing, which passes a fairly robust set of test cases, screenshotted below:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;regexmatch(
  pattern: &amp;quot;^[A-Z0-9\&amp;#39;\+\&amp;amp;\%_-]+(\.{0,1}[A-Z0-9\&amp;#39;\+\&amp;amp;\%_-]+)*[@]{1}[A-Z0-9.-]*[A-Z0-9-]+[.]{1}[A-Z]{2,6}$&amp;quot;,
  searchString: ri!email,
  regexFlags: &amp;quot;si&amp;quot;
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/12/pastedimage1641920521323v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;The above code simply replaced my old, OOTB code in the expression rule I&amp;#39;d been using (i actually kept it, but commented out, for posterity).&lt;/p&gt;
&lt;p&gt;I should also note that the modern version of the &lt;em&gt;&lt;strong&gt;People Functions&lt;/strong&gt;&lt;/em&gt;&lt;strong&gt;&lt;/strong&gt; plug-in seems to have a built-in expression funciton, &lt;span style="text-decoration:underline;"&gt;&lt;em&gt;validateEmailAddress()&lt;/em&gt;&lt;/span&gt;, which I can confirm passes all of the above test cases as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Way to Validate Email Addresses</title><link>https://community.appian.com/thread/89618?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 07:29:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c58b4998-ceab-496d-ae77-e26412d064a2</guid><dc:creator>rwandam0001</dc:creator><description>&lt;p&gt;The fully RFC 822 compliant regex is inefficient and obscure for &lt;a href="http://net-informations.com/js/progs/email.htm"&gt;validate email address&lt;/a&gt; because of its length. Fortunately, RFC 822 was superseded twice and the current specification for email addresses is RFC 5322. RFC 5322 leads to a regex that can be understood if studied for a few minutes and is efficient enough for actual use.&lt;/p&gt;
&lt;p&gt;If you use HTML5, use this code:&lt;/p&gt;
&lt;p&gt;&amp;lt;input type=&amp;quot;email&amp;quot; name=&amp;quot;email&amp;quot; required placeholder=&amp;quot;Enter a valid email address&amp;quot;&amp;gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Way to Validate Email Addresses</title><link>https://community.appian.com/thread/89455?ContentTypeID=1</link><pubDate>Tue, 04 Jan 2022 10:30:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fd14993a-28fb-4039-946b-94f1a6803e98</guid><dc:creator>deepakk0018</dc:creator><description>&lt;p&gt;thanks MIke&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Way to Validate Email Addresses</title><link>https://community.appian.com/thread/66415?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 13:28:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1a45ff5d-c0cb-4a0a-902e-3955a324fd15</guid><dc:creator>colleeny</dc:creator><description>&lt;p&gt;Thanks Mike - this was extremely helpful!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Way to Validate Email Addresses</title><link>https://community.appian.com/thread/66016?ContentTypeID=1</link><pubDate>Thu, 18 Apr 2019 21:11:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0f845803-983e-478c-a7a2-08a4bbbae118</guid><dc:creator>Harish G Nair</dc:creator><description>&lt;p&gt;Thanks Mike!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Way to Validate Email Addresses</title><link>https://community.appian.com/thread/29881?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2016 06:30:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:14ee2212-35af-47ca-bed4-5a74254a194b</guid><dc:creator>darrynj</dc:creator><description>Thank you all **&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Way to Validate Email Addresses</title><link>https://community.appian.com/thread/29880?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2016 06:29:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a84d8252-ddb1-4f54-b90a-67095ed6f9da</guid><dc:creator>darrynj</dc:creator><description>Thank all.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Way to Validate Email Addresses</title><link>https://community.appian.com/thread/29876?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2016 02:08:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6a970796-939f-4302-a66a-af6a9232a7ed</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;The code I posted in the above linked thread is something I&amp;#39;ve worked on a lot in the past, to make sure it&amp;#39;s robust and flexible (though a regex solution might still be admittedly more powerful). I&amp;#39;m attaching the latest version of my generalized rule here if anyone wants to refer to it. I guess the pro of this rule is that it&amp;#39;s OOB and fairly easy to understand and tweak as needed.&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-filesystemfile/__key/communityserver-discussions-components-files/12/Email-Validation.sail"&gt;Email Validation.sail&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Way to Validate Email Addresses</title><link>https://community.appian.com/thread/29875?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2016 01:35:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8e21dc3b-e75e-478a-9302-f30b2b0965eb</guid><dc:creator>shailendras593</dc:creator><description>Adding to what @philb said above, you can use the below code snippet to validate email address through regex plugin.&lt;br /&gt;&lt;br /&gt;regexmatch(&amp;quot;\\b[A-Z0-9._%-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}\\b&amp;quot;,ri!email)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Way to Validate Email Addresses</title><link>https://community.appian.com/thread/29874?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2016 01:10:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:52b7338d-5a7a-48eb-8488-ed398d2d17b2</guid><dc:creator>PhilB</dc:creator><description>You could also use the regex plugin and validate the addresses with a regular expression.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Way to Validate Email Addresses</title><link>https://community.appian.com/thread/29873?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2016 00:44:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:77057c36-90e7-44e1-ba9e-f701dfeff197</guid><dc:creator>Colton Beck</dc:creator><description>This post might be helpful:&lt;br /&gt;&lt;br /&gt;&lt;a href="/search?q=OriginalPostID-50780"&gt;forum.appian.com/.../b-50780&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>