23
rated 0 times
[
30]
[
7]
/ answers: 1 / hits: 96741
/ 8 Years ago, fri, august 5, 2016, 12:00:00
On a contact form, I have several input fields. One of those fields, is an email address field:
<input type='text' name='input_email' onChange={this.validateEmail}/>
Right now, I have the email validation function set to the onChange attribute. Thus, while the user is entering characters into the email field, an error message appears the whole time.
I want to change this, so that this.validateEmail
only gets called once when the user leaves that specific input field. How would I accomplish this?
I can't find any default object events that would solve this issue.
FYI, using ReactJS
More From » html