TextInput é tipo de email
<TextInput
placeholder="Email ID"
onChangeText={(text) => this.validate(text)}
value={this.state.email}
/>
Stupid Skipper
<TextInput
placeholder="Email ID"
onChangeText={(text) => this.validate(text)}
value={this.state.email}
/>
validate = (text) => {
console.log(text);
let reg = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
if (reg.test(text) === false) {
console.log("Email is Not Correct");
this.setState({ email: text })
return false;
}
else {
this.setState({ email: text })
console.log("Email is Correct");
}
}