I am trying to validate inputText to make sure it is a correctly formatted email address. However, I'm getting the following issues:
let reg = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
if (reg.test(emailText) === false) {
alert('Email is Not Correct');
// this.setState({email: emailText});
return false;
} else {
// this.setState({email: emailText});
alert('Email is Correct');
}
Works with some issues the following:
hello@gmail.com // works
hello.world@gmail.com // works
some.thing@gm.ci.co // will not work and is a real email address
Another other issue is that my characters count is limited. How do I remove the limit? I need to be able to have unlimited characters