I have an email input in my react component:
<input
type="email"
autoComplete="email"
placeholder="Email"
required
value={this.state.formData.email}
onChange={this.handleFieldChange('email')}
/>
which throws me a warning in the console:
The specified value "myemail" is not a valid email address.
with each keystroke till the input is a valid email. I believe this is default HTML5 email validation message and since I change its' state with each keystroke, react rerenders it and HTML5 re-validates it. Changing the type to "text" fixes it, but I would love to keep it as "email". What would be a proper way to handle this in react in order to avoid those html5 warnings?