Form validation for multiple inputs
A pattern I use for this is individual validators:

function validateName(value) {
  if (value.length &gt; 0) {
    if (!inputValue.match(/^[a-zA-Z]+$/)) {
      return 'Letters only'
    }
  }
  return ''
}


Obviously this can be heavy for simple forms, but it's a very reusable pattern, and it keeps your components lighter:

handleValidation(e) {
  const name = e.target.name
  const value = e.target.value  
  this.setState({ [name]: value }, () =&gt; {
    if (name === 'firstName') {
      this.setState({ errors[name]: validateName(value) })
    }
  })  
}


This allows you to do:

{this.state.errors['firstName'] &amp;&amp; &lt;div className="form-error"&gt;{this.state.errors['firstName']}&lt;/div&gt;}


One benefit I find to this pattern is that it scales well - as your forms grow, you'll refactor to have your inputs as their own components and managing their own state, and this pattern will scale better and better as you refactor, as opposed to doing all the checking within a single function.