- 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:44 PM
Hi @Community Alums ,
it will check whether entered text has @runjay.com or not if find then it will return 0 else it will return -1 .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2024 11:38 PM
Hi @Community Alums ,
I would recommend to use OOTB variable regex validator (email validation) to validate if the entered value is a acceptable format of email and on top of that i would use OnChange client script that would validate to avoid suffix such as @gmail or @yahoo etc..
or you can also use a 1 script that can do all the validation as suggested by @Runjay Patel 🙂
I hope this help.
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2024 11:45 PM
Hi @raj chavan @Sohail Khilji @Runjay Patel @Community Alums ,
I got a new problem now. The email can be relax.com or Relax.com.
Regards
Suman P.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2024 11:47 PM
@Community Alums
Do you know which all doing can you accept , is there any fixed domain that you have ?
if yes then you can check if the entered email has one of the accepted domain in the list or array that you create in the script..
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2024 11:47 PM
Hi @Community Alums ,
you just need to change from @@Runjay.com to relax.com and add or condition and add Relax.com rest other code would be same