title: Email Validation (React Native). Returning the result as 'invalid' for all the entries
body: <p>I am trying to validate a users email, by checking it against an expression. But the result i am getting is invalid for all the entries. </p>
  
  <p><strong>UPDATED CODE</strong></p>
  
  <pre><code>class dummytest extends Component{
  
    constructor(props){
      super(props);
      this.state = {
                  email :'',
                  validated: false ,
                   }
    };
  
  go = () =&gt; {
             const reg = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
             if (reg.test(this.state.email) === true){
                 alert( valid);
             }
             else{
                 alert();
             }
   }
    render(){
         return(
           &lt;View style={{alignSelf:'center',marginTop:100}}&gt;
                &lt;TextInput autoCapitalize="none" autoCorrect={false} style={{height:20,width:200,backgroundColor:'blue'}} value={this.setState.email}/&gt;
  
                &lt;Button onPress={this.go.bind(this)}&gt;
                   &lt;Text&gt; GO &lt;/Text&gt;
                &lt;/Button&gt;
            &lt;/View&gt;
  
         );
      }
  }
  </code></pre>