In Magento we can restrict user registration to specific email domains, therefore for restricting specific email domains on registration page we have to add a validation
for example we can add like this-
function validateEmailDomain($email) {
if(preg_match("/^([a-zA-Z0-9\._-])*@xyz.com$/",$email)){
return true;
}
return false;
}
0 Comment(s)