isNumberKey(event) {
    const invalidEntryErrorMessage = 'Please enter only numbers.';
    if (!/^\d*$/.test(event.target.value)) {
      this.setState({ error: invalidEntryErrorMessage });
    } else if (this.state.error === invalidEntryErrorMessage) {
      this.setState({ error: '' });
    }
  }
/*
  * show error if something other than a number is entered
  * else clear out previous error if there was one showing
  */
show error if something other than a number is entered
else clear out previous error if there was one showing
show error if something other than a number is entered else clear out previous error if there was one showing
isNumberKey(event) {
    const invalidEntryErrorMessage = 'Please enter only numbers.';
    if (!/^\d*$/.test(event.target.value)) {
      this.setState({ error: invalidEntryErrorMessage });
    } else if (this.state.error === invalidEntryErrorMessage) {
      this.setState({ error: '' });
    }
  }
isNumberKey ( event ) { const invalidEntryErrorMessage = 'Please enter only numbers.' ; if ( ! / ^\d*$ / . test ( event . target . value ) ) { this . setState ( { error : invalidEntryErrorMessage } ) ; } else if ( this . state . error === invalidEntryErrorMessage ) { this . setState ( { error : '' } ) ; } }
show error if something other than a number is entered
 else clear out previous error if there was one showing
show error if something other than a number is entered else clear out previous error if there was one showing