04-27-2023 12:40 AM
Hello all,
In my ISE Guest solution, sponsors have to approve the guest to get into the guest network. That means, the guest can register by himself and the sponsor gets a mail, where he can click Approve or Deny. This all works. But I want to check if the entered mail ends with certain domains when entering the field "Person being visited).
In the community I found the following code and it works too
<script>
setTimeout(function(){
$.validator.addMethod("customemailvalidator", function(value, element) {
return /^(\w+\.?)+@example\.com$/.test( value );
}, 'Please enter a valid email.');
jQuery("[name='guestUser.fieldValues.ui_person_visited']").rules("add",{customemailvalidator:true});
}, 50);
</script>
However, I want multiple domains to be possible, so for example example.com and test.com. In my regex understanding, I then actually just need to write /^(\w+\.?)+@(example|test)\.com$/.test( value ); here. However, this does not work. Only example.com is considered as correct here.
Can someone help me here please?
Solved! Go to Solution.
05-01-2023 11:58 PM
Problem solved. You need to restart the ISE
05-01-2023 11:58 PM
Problem solved. You need to restart the ISE
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: