Expand my Community achievements bar.

domain name in Email ID?

Avatar

Level 8

Hello

In my_form i have couple of email ID populating fields, i placed the adobe's email object text feilds, hence am getting a validation error popup, if user do not put either @ or a period, fine

But, as this is used with in company and user always specifies company employee's official ID, hence i want to put a validation for DOMAIN NAME.

The company's domain names looks like "domain1" or "domain2", email IDs looks like my_name@domain1.com or my_name@domain2.com

User is SUPPOSE to enter ONLY either domain1 or domain2, if not, i need to alert!! (not like gmail, Yahooh email ID)

1) Pls. let me know, is there in built feature (like Validation Pattern)?

2) Any ready-made function? if so, pls. code snippet

3) If not, pls. provide code snippet

I am looking in JavaScript

Thank you

2 Replies

Avatar

Former Community Member

Validation Pattern should work. Something like this: text{O'@domain1.com'}|text{O'@domain2.com'}

You can also use regular expression.

Avatar

Level 8

If you get a chance, pls. let me know the regular expression for my requirement, am a newbie to forms.

Thank you