AAA, NAC, Guest Access & BYOD

How to restrict email/sponsor_email field in guest self registration form to not accept specific email address.

Aruba Employee

Introduction : We have seen requirements to restrict list of email address in sponsor_email field during guest self registration. This article will help to validate the field value using a simple Java Script.


Environment : Supported on all Amigopod/ClearPass Guest versions.


Configuration Steps :


Step 1: In the below script, replace the form name with actual guest self registration page/form name. You could obtain the form name by navigating to ClearPass Guest >> Configuration >> Guest Self-Registration >> Select the registration page >> click on Edit and locate the form name as shown below.


<script type="text/JavaScript"><!--{literal}
function RegisterSubmit(form_name) {
    var frm = document.forms[form_name];
     var error = 'Please enter a valid Email';
            //converting the sponsor_email filed value to lower case here...
            var temp1= frm.sponsor_email.value.toLowerCase();
            //Validating the field value/email address here...
          if(temp1 == "" )
//Multiple email addressed can be added using "||". Eg: if(temp1 == "" || temp1 == "" || temp1 == ""  )
        return false
                      return true;
                      } }


The above script don't allow the value/email "xyz@arubanetworks" in the Sponsor Email field.

Step 2: Copy and paste the script in the register page footer by navigating to Configuration >> Guest Self-Registration >> Select the registration page >> Edit >> Register Page >> Footer >> Footer HTML.



Step 3: Add the function name "RegisterSubmit" to the submit field in the same form by navigating to Configuration >> Guest Self-Registration >> Select the registration page >> Edit >> Register Page >> Form >> select the "submit" field >> Edit >> Advanced Properties >> AJAX Submit: >> ente the text "RegisterSubmit".




Answer : After the completion of above customization, the sponsor email field won't accept the restricted email addresses during the registration.

Version history
Revision #:
1 of 1
Last update:
‎11-10-2014 05:18 AM
Updated by:
Labels (1)

How would I do this if I wanted to use Regex in the email address?

Search Airheads
Showing results for 
Search instead for 
Did you mean: 
Is this a frequent problem?

Request an official Aruba knowledge base article to be written by our experts.