Answers for "input should reject non-alphabetical input reacj js"

0

input should reject non-alphabetical input reacj js

onChangeAlphaNumericInput(e) {
  const value = e.target.value;
  const regex = /^[0-9a-zA-Z(\-)]+$/; //this will admit letters, numbers and dashes
  if (value.match(regex) || value === "") {
    this.setState({ inputValue: value });
  }
}
Posted by: Guest on March-08-2022

Code answers related to "input should reject non-alphabetical input reacj js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language