07-25-2019 03:23 AM
I am trying to restrict Sponsor to enter mycompany.com domain in the person being visited field and restrict any other personal emails entered in this field. I am currently running ISE 2.2 with Patch14.
I have found a bug related to it - https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvq23221/?rfs=iqvred and logged a case with TAC.
Please see the attached picture where in the Sponsor portal is allows me to use any personal emails to be entered in the person being visited field. Is there any working Java script to achieve this function.
Solved! Go to Solution.
07-25-2019 07:04 AM
08-01-2019 07:38 AM - edited 08-01-2019 07:55 AM
I have tried this scripts and it is working now for the sponsor portal
Create Account for Known Guests (Paste this Script in Instructional text) ======================================================================= <script> function customEmailValidator(){ $.validator.addMethod("customemailvalidator", function(value, element) { return /^(\w+\.?)+@(domain1|domain2|domain3)\.com$/.test( value ); }, 'Please enter a valid email.'); $(".personBeingVisited").rules("add",{customemailvalidator:true}); } $(document).ready(function(){ setTimeout(function() { customEmailValidator(); $('#createButton').on('click', function(evt){ setTimeout(function() { $('.approve-accounts-content > div.ui-navbar > ul > li.ui-block-b > a').on('click', function(){ setTimeout(function() { customEmailValidator(); }, 6000); }); }, 4000); }); $('.ui_create_accounts_button').on('click', function(){ setTimeout(function() { customEmailValidator(); }, 5000); }); }, 5000); }); </script>
07-25-2019 07:04 AM
08-01-2019 07:38 AM - edited 08-01-2019 07:55 AM
I have tried this scripts and it is working now for the sponsor portal
Create Account for Known Guests (Paste this Script in Instructional text) ======================================================================= <script> function customEmailValidator(){ $.validator.addMethod("customemailvalidator", function(value, element) { return /^(\w+\.?)+@(domain1|domain2|domain3)\.com$/.test( value ); }, 'Please enter a valid email.'); $(".personBeingVisited").rules("add",{customemailvalidator:true}); } $(document).ready(function(){ setTimeout(function() { customEmailValidator(); $('#createButton').on('click', function(evt){ setTimeout(function() { $('.approve-accounts-content > div.ui-navbar > ul > li.ui-block-b > a').on('click', function(){ setTimeout(function() { customEmailValidator(); }, 6000); }); }, 4000); }); $('.ui_create_accounts_button').on('click', function(){ setTimeout(function() { customEmailValidator(); }, 5000); }); }, 5000); }); </script>
08-24-2023 06:46 AM
how to place this script in portal page ?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide