Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / March 2006

Tip: Looking for answers? Try searching our database.

email address validation rule?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Wayne - 07 Mar 2006 17:46 GMT
I am just getting my feet wet with infopath so I am a little green. However,
the form I have created is a simple SQL database that contains email
addresses for a newsletter. I just want to have the users add their email
address from the form which works, but I am unable to get any sort of
validation to work. Is there a common pattern I should be using in the data
enty custom pattern choice?
Pointers would be appreciated.
Adam Harding - 08 Mar 2006 11:24 GMT
Wayne

How about chekcing the email address contains '@domainname.com'

or just containing @?

Something like that anyway.

Cheers Adam

> I am just getting my feet wet with infopath so I am a little green. However,
> the form I have created is a simple SQL database that contains email
[quoted text clipped - 3 lines]
> enty custom pattern choice?
> Pointers would be appreciated.
S.Y.M. Wong-A-Ton - 08 Mar 2006 13:10 GMT
Try adding Data Validation with a "does not match pattern" condition and a
"Custom Pattern" such as

([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)

---
S.Y.M. Wong-A-Ton

> I am just getting my feet wet with infopath so I am a little green. However,
> the form I have created is a simple SQL database that contains email
[quoted text clipped - 3 lines]
> enty custom pattern choice?
> Pointers would be appreciated.
Wayne - 08 Mar 2006 17:40 GMT
That worked...I was playing with RegEx phrases but I was not successful.
Thanks for the tip.

> Try adding Data Validation with a "does not match pattern" condition and a
> "Custom Pattern" such as
[quoted text clipped - 13 lines]
>> enty custom pattern choice?
>> Pointers would be appreciated.
Brian - 08 Mar 2006 17:51 GMT
If you want a regex expression for validating e-mail, try this page.
They have several different ones out there.

http://regexlib.com/

Brian
Rajani - 28 Mar 2006 08:36 GMT
To assign a data entry pattern to the E-mail Address text box
With the form still open, double-click the E-mail Address text box.
In the Text Box Properties dialog box, on the Data tab, click Data
Validation.
In the Data Validation dialog box, click Add.
Make sure that the first box under If this condition is true contains the
control's field ("email"), and then in the second box, click does not match
pattern.
In the third box, click Select a pattern.
In the Data Entry Pattern dialog box, in the Standard patterns list, select
Custom pattern to clear the existing text in the Custom pattern box. Patterns
use the syntax defined by the W3C XML Schema pattern restrictions.
In the Insert special character list, select Any Letter.
In the Insert special character list, select One or more.
In the Custom pattern box, type @contoso after the existing characters.
In the Insert special character list, select Period.
In the Custom pattern box, type com after the existing characters. The
custom data entry pattern should look like this: .+@contoso\.com
Click OK to exit the Data Entry Pattern dialog box.
In the ScreenTip box in the Data Validation dialog box, type Please use your
Contoso e-mail address. This text appears when a user points to or
right-clicks the control.
Close all open dialog boxes.
To test your changes, click Preview Form on the Standard toolbar. Type
name@example.com in the E-mail Address text box. A dashed red line appears
around the text box, which indicates that there's a problem with the data you
entered. When you move your mouse pointer over the text box, the ScreenTip
that you specified in step 13 appears.

Signature

Rajani,
http://www.autonomysystems.com

> If you want a regex expression for validating e-mail, try this page.
> They have several different ones out there.
>
> http://regexlib.com/
>
> Brian
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.