Email form validation to accept only one domain : <p>I know this is a relatively asked question but here goes. I have registration form where a user can sign up but I want it to be for a closed group of people so only people from my company can register. So only people with @company.com domain addresses can register. What I have so far is just a email validation code using patterns. How would I alter the below code to only allow @company.com emails? Cheers.</p>

<pre><code>$email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';

if(!preg_match($email_exp,$email_from)) {

$error_message .= 'The Email Address you entered does not appear to be valid.&lt;br /&gt;';

}
</code></pre>
