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…..
You can use regular expression for this. Just use the below function:
Code Edited