Validating text field for email addresses - InfoPath Dev
in

InfoPath Dev

Validating text field for email addresses

Last post 07-01-2017 10:19 AM by mindea. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-23-2017 02:47 PM

    Validating text field for email addresses

    I found an excellent post here http://www.infopathdev.com/forums/t/26687.aspx that shows how to set validation on a text field such that it only allows (one or more) email addresses (separated by a comma). Like [email protected] or [email protected],[email protected] I'd like to take this a step further and only allow email addresses for a specific domain, xyz.com, but I can't figure it out. Here's the validation string ([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*,\s*([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}))* How would I modify this to only allow (one or more) email addresses (separated by a comma) for xyz.com? Many thanks.
    Filed under:
  • 06-28-2017 08:13 AM In reply to

    Re: Validating text field for email addresses

     You may have already gotten this, but wouldn't it be:

    ([a-zA-Z0-9_\-\.]+)@xyz.com(\s*,\s*([a-zA-Z0-9_\-\.]+)@xyz.com)* 

    Hilary Stoupa

  • 07-01-2017 10:19 AM In reply to

    Re: Validating text field for email addresses

    Yes, that worked perfectly. I was expecting something more complicated. Thank you very much!
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.