I'm developing a reactjs application and I want that my user must enter only alphabets in an input field. Here is my code.
<input value= {this.state.val} onChange = {this.handleVal}/>
handleVal = (e)=>{
this.setState({
val:e.target.value
})
}
state = {
val:''
}
My component has lot of code but i entered only the relevant. Thanks in advance.