I have written a method that captures the entered key through event.
NameValidation(e){
if(!e.key.match(/^[a-zA-Z]*$/))
{
e.key = '';
console.log(e.key);
}
},
What this does is basically checks if a user has entered a special character or number and if so replaces the special character/number to an empty string.
The issue starts with e.key = '';
.
As it does not replace the captured key. What am I missing here ?