Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6542375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:13:10+00:00 2026-05-25T11:13:10+00:00

I have to build a custom module in which i have added a custom

  • 0

I have to build a custom module in which i have added a custom fields on to the customer registration page a fields like alternate mail id,mobile number & etc which is successfully getting saved in my database & here i have to implement a one more feature that is

on registration page when user enters his email id that should check for the domain name.

Ex: my domain name is abc & the users mail address will be user@abc.com

& the users of “abc.com” should only has to get register into my online store
How do i restrict the users of other domain apart from abc.com

Please help me in doing this…..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:13:11+00:00Added an answer on May 25, 2026 at 11:13 am

    You can use regular expression for this. Just use the below function:

    function checkEmail($email) {
      if(preg_match("/^([a-zA-Z0-9\._-])*@abc.com$/",$email)){
    
        return true;
      }
      return false;
    }
    

    Code Edited

        <script type="text/javascript">
        function validateEmail(elementValue){  
           var emailPattern = /^[a-zA-Z0-9._-]+@abc.com$/;  
           return emailPattern.test(elementValue);  
         }  
    
        function checkForm(){
            var emailId = document.getElementById('email_address').value;
            if(! validateEmail(emailId)) {
                alert("Email id is not valid");
            }
        }
    </script>
    
    <div class="input-box"style="width: 550px;"> 
        <input type="text" name="email" id="email_address" value="<?php echo $this->htmlEscape($this->getFormData()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" /> 
    
        <input type="submit" value="Click here" onclick="checkForm()" />(There will be be an submit button put the onclick event in it)
    
    </div> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have inherited a visual studio 2003 project which uses some custom build steps.
I have a number of maven projects which build various components of a plugin
I would like to build a custom search module in Drupal 6 for searching
i have a custom module with a form I have implemented form hooks like
I'm going to have to build a custom control for a WinForms application. But
I have three custom build configurations { Dev, Qs, Prd }. So, I have
I have a custom build target in a visual studio 2008 c# project. Is
I have a custom build of a Unix OS. My task: Adding an IPSec
For reference, I'm using Visual Studio 2010. I have a custom build step defined
I have a custom script step in my build process that zips the executable.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.