
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2024 11:09 PM
Hi,
I have a requirement that the email service catalog variable should accept only the *@company.com format, where * can be any name. It will not accept @gmail, @Yahoo, or any. Kindly help.
Regards
Suman P.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2024 11:51 PM
Hi @Community Alums ,
You can create Regular expression in ( question_regex ) table. As mentioned below.
Expresssion : ^[a-zA-Z0-9._%+-]+@testcompany\.com$
Now in catalog item select single line text as a variable and in Type Specification section there is field called validation regex in that select regular expression which you created above in question_regex table.
Please mark my response as correct and helpful if it helped solved your question.
Thanks,
Rohit Suryawanshi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2024 11:49 PM
Hey, you can use OR condition in your script suitable to your usecase
if (email.indexOf('@runjay.com') == -1 || email.indexOf('Your condition') ){
}
Thanks,
Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2024 11:51 PM
Hi @Community Alums ,
You can create Regular expression in ( question_regex ) table. As mentioned below.
Expresssion : ^[a-zA-Z0-9._%+-]+@testcompany\.com$
Now in catalog item select single line text as a variable and in Type Specification section there is field called validation regex in that select regular expression which you created above in question_regex table.
Please mark my response as correct and helpful if it helped solved your question.
Thanks,
Rohit Suryawanshi

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2024 11:56 PM
Hi @Rohit99,
I like your approach. Where did you write
Also my requirement is to accept suman@company.com or suman@Company.com
Regards
Suman P.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2024 01:36 AM
Table name : Questions Regular Expressions (question_regex)
My requirement is to accept suman@company.com or suman@Company.com
For this you can write the following expression:
^[a-zA-Z0-9._%+-]+@company\.com$|^[a-zA-Z0-9._%+-]+@Company\.com$
Please mark my response as correct and helpful if it helped solved your question.
Thanks,
Rohit Suryawanshi