title: React - A More Comprehensive Email Validation
body: <p>I'm looking to do a more comprehensive email validation than the one I currently have. If you take a look at my code, I'm only checking for @ symbol and ends in .com. Is there a more comprehensive validation check I can include into my current code configuration? </p>
  
  <p>JS:</p>
  
  <pre><code>this.state = {
    inputs: {
      name: '',
      email: '',
      message: '',
    },
    errors: {
      name: false,
      email: false,
      message: false,
    },
  };
  
  handleOnChange = e =&gt; {
  
  const { name, value } = e.target;
  
  if (name === 'email') {
    this.setState({
      inputs: {
        ...this.state.inputs,
        [name]: value,
      },
      errors: {
        ...this.state.errors,
        email:
          (value.includes('@') &amp;&amp; value.slice(-4).includes('.com'))
            ? false
            : true,
      },
    });
  } else {
    this.setState({
      inputs: {
        ...this.state.inputs,
        [name]: value,
      },
      errors: {
        ...this.state.errors,
        [name]: false,
      },
    });
  }
  </code></pre>
  
  <p>};</p>