title: Validate email domain in Laravel request
body: <p>I want to accept email from just one server when someone is registering, for example &quot;@myemail.com&quot;. If any other email address is given it will say your email is not valid.</p>
  <p>Below is the validator of my registration controller. What should I do?</p>
  <pre class="lang-php prettyprint-override"><code>protected function validator(array $data)
  {
      return Validator::make($data, [
          'name' =&gt; 'required|max:255',
          'email' =&gt; 'required|email|max:255|unique:users',
          'password' =&gt; 'required|min:6|confirmed',
          /*'usertype' =&gt; 'required',*/
      ]);
  }
  </code></pre>