<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>InfoPath 2010/2013 Email Validation Field</title><link>https://www.infopathdev.com:443/forums/thread/99715.aspx</link><pubDate>Tue, 21 Oct 2014 18:42:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:99715</guid><dc:creator>StephenTyson</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/99715.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=99715</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I wanted to write a post on email validation after numerous searches and some tinkering with validation rules with custom patterns. &lt;/p&gt;&lt;p&gt;So here goes my very first forum post. &lt;/p&gt;&lt;p&gt;Issue: I need an email validation field that will only allow specific email domains from within my organization.&amp;nbsp; &lt;/p&gt;&lt;p&gt;Test case: email domain = &lt;a href="mailto:user.name@AnyName.mail.com"&gt;user.name@AnyName.mail.com&lt;/a&gt;, &lt;a href="mailto:user.name@mail.com"&gt;user.name@mail.com&lt;/a&gt;, &lt;a href="mailto:username@AnyName.mail.com"&gt;username@AnyName.mail.com&lt;/a&gt;, &lt;a href="mailto:username@mail.com"&gt;username@mail.com&lt;/a&gt; &lt;/p&gt;&lt;p&gt;FieldName = email&lt;/p&gt;&lt;p&gt;&amp;nbsp;1. Create a text field &lt;/p&gt;&lt;p&gt;2. Mark as &amp;quot;Cannot be blank&amp;quot;&lt;/p&gt;&lt;p&gt;3. Create validation rule&lt;/p&gt;&lt;p&gt;4. Set Conditions&lt;/p&gt;&lt;p&gt;&amp;nbsp;You will need 4 conditions. &lt;/p&gt;&lt;p&gt;Run rule when this condition is true&lt;/p&gt;&lt;p&gt;&amp;quot;email&amp;quot; &amp;quot;does not match pattern&amp;quot; &amp;quot;Custom pattern &lt;a href="mailto:.+@+.[A-Za-z].mail.com"&gt;.+@+.[A-Za-z].mail.com&lt;/a&gt;&amp;quot;&amp;nbsp; and &lt;/p&gt;&lt;p&gt;&amp;quot;email&amp;quot; &amp;quot;does not match pattern&amp;quot; &amp;quot;Custom pattern &lt;a href="mailto:.+@mail.com"&gt;.+@mail.com&lt;/a&gt;&amp;nbsp;&amp;quot; and&lt;/p&gt;&lt;p&gt;&amp;quot;email&amp;quot; &amp;quot;does not match pattern&amp;quot; &amp;quot;Custom pattern&amp;nbsp;&lt;a href="mailto:.+@.+.[A-Za-z].mail.com"&gt;.+@.+.[A-Za-z].mail.com&lt;/a&gt; &amp;quot; or&lt;/p&gt;&lt;p&gt;&amp;quot;email&amp;quot; &amp;quot;does not match pattern&amp;quot; &amp;quot;Custom pattern &lt;a href="mailto:.+@.+\"&gt;.+@.+\&lt;/a&gt;..+&amp;nbsp;&amp;quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Select show screen tip and dialog box message&lt;/p&gt;&lt;p&gt;Set an informative Screen Tip and examples in your Dialog box. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This solution will allow for multiple domain levels below a single domain of &amp;quot;mail.com&amp;quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>